home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| Mailbox text, 1st line "From clewis@mnetor.UUCP (Chris Lewis) Thu Jun 19 16:37:07 1986"
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| detectItEasy
| Format: Plain text[LF]
| default
| |
100%
| xdgMime
| application/mbox
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 63 6c 65 | 77 69 73 40 6d 6e 65 74 |From cle|wis@mnet|
|00000010| 6f 72 2e 55 55 43 50 20 | 28 43 68 72 69 73 20 4c |or.UUCP |(Chris L|
|00000020| 65 77 69 73 29 20 54 68 | 75 20 4a 75 6e 20 31 39 |ewis) Th|u Jun 19|
|00000030| 20 31 36 3a 33 37 3a 30 | 37 20 31 39 38 36 0a 50 | 16:37:0|7 1986.P|
|00000040| 61 74 68 3a 20 73 65 69 | 73 6d 6f 21 68 61 72 76 |ath: sei|smo!harv|
|00000050| 61 72 64 21 74 68 69 6e | 6b 21 6e 69 6b 65 21 75 |ard!thin|k!nike!u|
|00000060| 63 62 63 61 64 21 75 63 | 62 76 61 78 21 68 70 6c |cbcad!uc|bvax!hpl|
|00000070| 61 62 73 21 6d 6f 74 73 | 6a 31 21 6d 6e 65 74 6f |abs!mots|j1!mneto|
|00000080| 72 21 63 6c 65 77 69 73 | 0a 46 72 6f 6d 3a 20 63 |r!clewis|.From: c|
|00000090| 6c 65 77 69 73 40 6d 6e | 65 74 6f 72 2e 55 55 43 |lewis@mn|etor.UUC|
|000000a0| 50 20 28 43 68 72 69 73 | 20 4c 65 77 69 73 29 0a |P (Chris| Lewis).|
|000000b0| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 6e 65 74 2e |Newsgrou|ps: net.|
|000000c0| 73 6f 75 72 63 65 73 0a | 53 75 62 6a 65 63 74 3a |sources.|Subject:|
|000000d0| 20 4e 65 77 73 20 41 64 | 6d 69 6e 73 3a 20 4e 65 | News Ad|mins: Ne|
|000000e0| 76 65 72 20 62 6c 6f 77 | 20 61 20 73 70 6f 6f 6c |ver blow| a spool|
|000000f0| 20 61 72 65 61 20 61 67 | 61 69 6e 21 0a 4d 65 73 | area ag|ain!.Mes|
|00000100| 73 61 67 65 2d 49 44 3a | 20 3c 33 35 35 31 40 6d |sage-ID:| <3551@m|
|00000110| 6e 65 74 6f 72 2e 55 55 | 43 50 3e 0a 44 61 74 65 |netor.UU|CP>.Date|
|00000120| 3a 20 31 39 20 4a 75 6e | 20 38 36 20 32 30 3a 33 |: 19 Jun| 86 20:3|
|00000130| 37 3a 30 37 20 47 4d 54 | 0a 4f 72 67 61 6e 69 7a |7:07 GMT|.Organiz|
|00000140| 61 74 69 6f 6e 3a 20 43 | 6f 6d 70 75 74 65 72 20 |ation: C|omputer |
|00000150| 58 20 28 43 41 4e 41 44 | 41 29 20 4c 74 64 2e 2c |X (CANAD|A) Ltd.,|
|00000160| 20 54 6f 72 6f 6e 74 6f | 2c 20 4f 6e 74 61 72 69 | Toronto|, Ontari|
|00000170| 6f 2c 20 43 61 6e 61 64 | 61 0a 4c 69 6e 65 73 3a |o, Canad|a.Lines:|
|00000180| 20 35 39 30 0a 4b 65 79 | 77 6f 72 64 73 3a 20 6e | 590.Key|words: n|
|00000190| 65 77 73 20 62 61 74 63 | 68 20 73 70 6f 6f 6c 20 |ews batc|h spool |
|000001a0| 75 75 63 70 20 66 65 65 | 64 0a 0a 23 21 2f 62 69 |uucp fee|d..#!/bi|
|000001b0| 6e 2f 73 68 0a 65 63 68 | 6f 20 27 53 74 61 72 74 |n/sh.ech|o 'Start|
|000001c0| 20 6f 66 20 70 61 63 6b | 2e 6f 75 74 2c 20 70 61 | of pack|.out, pa|
|000001d0| 72 74 20 30 31 20 6f 66 | 20 30 31 3a 27 0a 65 63 |rt 01 of| 01:'.ec|
|000001e0| 68 6f 20 27 78 20 2d 20 | 52 45 41 44 4d 45 27 0a |ho 'x - |README'.|
|000001f0| 73 65 64 20 27 73 2f 5e | 58 2f 2f 27 20 3e 20 52 |sed 's/^|X//' > R|
|00000200| 45 41 44 4d 45 20 3c 3c | 20 27 2f 27 0a 58 4e 65 |EADME <<| '/'.XNe|
|00000210| 77 73 20 41 64 6d 69 6e | 73 21 0a 58 0a 58 53 69 |ws Admin|s!.X.XSi|
|00000220| 63 6b 20 6f 66 20 68 61 | 76 69 6e 67 20 6d 69 6c |ck of ha|ving mil|
|00000230| 6c 69 6f 6e 73 20 6f 66 | 20 63 72 6f 6e 20 65 6e |lions of| cron en|
|00000240| 74 72 69 65 73 2c 20 64 | 69 66 66 65 72 69 6e 67 |tries, d|iffering|
|00000250| 20 5b 63 73 37 5d 73 65 | 6e 64 62 61 74 63 68 20 | [cs7]se|ndbatch |
|00000260| 73 63 72 69 70 74 73 2c | 0a 58 61 6e 64 20 62 6c |scripts,|.Xand bl|
|00000270| 6f 77 6e 20 6f 75 74 20 | 73 70 6f 6f 6c 20 61 72 |own out |spool ar|
|00000280| 65 61 73 20 77 69 74 68 | 20 79 6f 75 72 20 64 6f |eas with| your do|
|00000290| 77 6e 73 74 72 65 61 6d | 20 66 65 65 64 73 3f 20 |wnstream| feeds? |
|000002a0| 20 57 65 6c 6c 2c 20 68 | 61 76 65 20 49 20 67 6f | Well, h|ave I go|
|000002b0| 74 0a 58 73 6f 6d 65 74 | 68 69 6e 67 20 66 6f 72 |t.Xsomet|hing for|
|000002c0| 20 79 6f 75 21 0a 58 0a | 58 54 68 65 20 66 6f 6c | you!.X.|XThe fol|
|000002d0| 6c 6f 77 69 6e 67 20 70 | 72 6f 67 72 61 6d 20 28 |lowing p|rogram (|
|000002e0| 62 61 74 63 68 65 72 29 | 20 73 6f 6c 76 65 73 20 |batcher)| solves |
|000002f0| 61 6c 6c 20 6f 66 20 74 | 68 65 73 65 20 70 72 6f |all of t|hese pro|
|00000300| 62 6c 65 6d 73 20 28 69 | 66 20 79 6f 75 72 27 72 |blems (i|f your'r|
|00000310| 65 0a 58 6c 75 63 6b 79 | 21 29 2e 20 20 59 6f 75 |e.Xlucky|!). You|
|00000320| 20 69 6e 73 74 61 6c 6c | 20 69 74 20 69 6e 20 79 | install| it in y|
|00000330| 6f 75 72 20 2f 75 73 72 | 2f 6c 69 62 2f 6e 65 77 |our /usr|/lib/new|
|00000340| 73 20 61 6c 6f 6e 67 20 | 77 69 74 68 20 61 20 62 |s along |with a b|
|00000350| 61 74 63 68 20 0a 58 63 | 6f 6e 74 72 6f 6c 20 66 |atch .Xc|ontrol f|
|00000360| 69 6c 65 20 28 22 62 61 | 74 63 68 2e 63 74 72 6c |ile ("ba|tch.ctrl|
|00000370| 22 29 2e 20 20 62 61 74 | 63 68 2e 63 74 72 6c 20 |"). bat|ch.ctrl |
|00000380| 63 6f 6e 74 61 69 6e 73 | 20 61 20 6c 69 6e 65 20 |contains| a line |
|00000390| 70 65 72 20 64 6f 77 6e | 2d 73 74 72 65 61 6d 20 |per down|-stream |
|000003a0| 0a 58 73 69 74 65 20 77 | 68 69 63 68 20 63 6f 6e |.Xsite w|hich con|
|000003b0| 74 61 69 6e 73 20 64 65 | 73 63 72 69 70 74 69 6f |tains de|scriptio|
|000003c0| 6e 73 20 6f 6e 20 68 6f | 77 20 74 6f 20 73 65 6e |ns on ho|w to sen|
|000003d0| 64 20 6e 65 77 73 20 74 | 6f 20 74 68 61 74 20 73 |d news t|o that s|
|000003e0| 69 74 65 2e 0a 58 0a 58 | 53 65 74 75 70 3a 0a 58 |ite..X.X|Setup:.X|
|000003f0| 09 2d 20 6d 6f 64 69 66 | 79 20 79 6f 75 72 20 22 |.- modif|y your "|
|00000400| 73 79 73 22 20 66 69 6c | 65 20 73 6f 20 74 68 61 |sys" fil|e so tha|
|00000410| 74 20 65 61 63 68 20 73 | 79 73 74 65 6d 20 79 6f |t each s|ystem yo|
|00000420| 75 20 77 61 6e 74 20 74 | 6f 20 63 6f 6e 74 72 6f |u want t|o contro|
|00000430| 6c 0a 58 09 20 20 74 68 | 69 73 20 77 61 79 20 68 |l.X. th|is way h|
|00000440| 61 73 20 62 61 74 63 68 | 69 6e 67 20 74 75 72 6e |as batch|ing turn|
|00000450| 65 64 20 6f 6e 2e 20 20 | 45 67 3a 0a 58 09 09 6d |ed on. |Eg:.X..m|
|00000460| 6e 65 74 6f 72 3a 2e 2e | 2e 2e 3a 46 3a 2f 75 73 |netor:..|..:F:/us|
|00000470| 72 2f 73 70 6f 6f 6c 2f | 62 61 74 63 68 2f 6d 6e |r/spool/|batch/mn|
|00000480| 65 74 6f 72 0a 58 09 2d | 20 61 64 64 20 61 20 6c |etor.X.-| add a l|
|00000490| 69 6e 65 20 66 6f 72 20 | 74 68 65 20 73 69 74 65 |ine for |the site|
|000004a0| 20 69 6e 74 6f 20 62 61 | 74 63 68 2e 63 74 72 6c | into ba|tch.ctrl|
|000004b0| 2e 20 20 62 61 74 63 68 | 2e 63 74 72 6c 20 63 6f |. batch|.ctrl co|
|000004c0| 6e 74 61 69 6e 73 0a 58 | 09 20 20 64 65 73 63 72 |ntains.X|. descr|
|000004d0| 69 70 74 69 6f 6e 73 20 | 6f 66 20 65 61 63 68 20 |iptions |of each |
|000004e0| 66 69 65 6c 64 2e 0a 58 | 09 2d 20 76 69 61 20 63 |field..X|.- via c|
|000004f0| 72 6f 6e 2c 20 72 75 6e | 20 62 61 74 63 68 65 72 |ron, run| batcher|
|00000500| 20 73 65 74 75 69 64 20 | 6e 65 77 73 20 77 69 74 | setuid |news wit|
|00000510| 68 20 65 69 74 68 65 72 | 3a 0a 58 09 09 2d 20 74 |h either|:.X..- t|
|00000520| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 73 |he name |of the s|
|00000530| 79 73 74 65 6d 0a 58 09 | 09 2d 20 61 20 22 63 6c |ystem.X.|.- a "cl|
|00000540| 61 73 73 22 20 28 77 68 | 69 63 68 27 6c 6c 20 72 |ass" (wh|ich'll r|
|00000550| 75 6e 20 61 6c 6c 20 73 | 79 73 74 65 6d 73 20 77 |un all s|ystems w|
|00000560| 69 74 68 20 74 68 61 74 | 20 63 6c 61 73 73 29 0a |ith that| class).|
|00000570| 58 0a 58 41 64 76 61 6e | 74 61 67 65 73 3a 0a 58 |X.XAdvan|tages:.X|
|00000580| 09 31 29 20 42 61 74 63 | 68 69 6e 67 20 69 6e 73 |.1) Batc|hing ins|
|00000590| 74 72 75 63 74 69 6f 6e | 73 20 66 6f 72 20 61 6c |truction|s for al|
|000005a0| 6c 20 64 6f 77 6e 73 74 | 72 65 61 6d 20 73 69 74 |l downst|ream sit|
|000005b0| 65 73 20 69 73 20 63 6f | 6e 74 61 69 6e 65 64 0a |es is co|ntained.|
|000005c0| 58 09 20 20 20 69 6e 20 | 6f 6e 65 20 66 69 6c 65 |X. in |one file|
|000005d0| 2c 20 69 6e 73 74 65 61 | 64 20 6f 66 20 68 61 76 |, instea|d of hav|
|000005e0| 69 6e 67 20 74 6f 20 6d | 61 6b 65 20 63 75 73 74 |ing to m|ake cust|
|000005f0| 6f 6d 69 7a 65 64 20 2a | 73 65 6e 64 62 61 74 63 |omized *|sendbatc|
|00000600| 68 65 73 0a 58 09 20 20 | 20 28 65 67 3a 20 64 69 |hes.X. | (eg: di|
|00000610| 66 66 65 72 69 6e 67 20 | 62 69 74 73 20 69 6e 20 |ffering |bits in |
|00000620| 63 6f 6d 70 72 65 73 73 | 2c 20 64 69 66 66 65 72 |compress|, differ|
|00000630| 65 6e 74 20 67 72 61 64 | 65 73 2c 20 64 69 66 66 |ent grad|es, diff|
|00000640| 65 72 65 6e 74 0a 58 09 | 20 20 20 62 61 74 63 68 |erent.X.| batch|
|00000650| 20 73 69 7a 65 73 29 0a | 58 09 32 29 20 59 6f 75 | sizes).|X.2) You|
|00000660| 20 63 61 6e 20 63 6f 6e | 74 72 6f 6c 20 74 68 65 | can con|trol the|
|00000670| 20 73 69 7a 65 20 6f 66 | 20 61 20 62 61 74 63 68 | size of| a batch|
|00000680| 20 2d 20 74 75 6e 69 6e | 67 20 66 6f 72 20 76 61 | - tunin|g for va|
|00000690| 72 69 6f 75 73 0a 58 09 | 20 20 20 6c 69 6e 6b 20 |rious.X.| link |
|000006a0| 71 75 61 6c 69 74 69 65 | 73 0a 58 09 33 29 20 49 |qualitie|s.X.3) I|
|000006b0| 66 20 79 6f 75 20 68 61 | 76 65 20 34 2e 33 20 42 |f you ha|ve 4.3 B|
|000006c0| 53 44 20 55 55 43 50 20 | 2d 20 79 6f 75 20 63 61 |SD UUCP |- you ca|
|000006d0| 6e 20 63 6f 6d 70 6c 65 | 74 65 6c 79 20 65 6c 69 |n comple|tely eli|
|000006e0| 6d 69 6e 61 74 65 0a 58 | 09 20 20 20 74 68 65 20 |minate.X|. the |
|000006f0| 70 6f 73 73 69 62 69 6c | 69 74 79 20 6f 66 20 62 |possibil|ity of b|
|00000700| 6c 6f 77 69 6e 67 20 6f | 75 74 20 79 6f 75 72 20 |lowing o|ut your |
|00000710| 73 70 6f 6f 6c 20 61 72 | 65 61 2e 20 20 62 61 74 |spool ar|ea. bat|
|00000720| 63 68 2e 63 74 72 6c 0a | 58 09 20 20 20 61 6c 6c |ch.ctrl.|X. all|
|00000730| 6f 77 73 20 79 6f 75 20 | 74 6f 20 73 70 65 63 69 |ows you |to speci|
|00000740| 66 79 20 74 68 65 20 6d | 61 78 69 6d 75 6d 20 6c |fy the m|aximum l|
|00000750| 65 6e 67 74 68 20 74 68 | 65 20 55 55 43 50 20 71 |ength th|e UUCP q|
|00000760| 75 65 75 65 20 63 61 6e | 20 62 65 0a 58 09 20 20 |ueue can| be.X. |
|00000770| 20 66 6f 72 20 65 61 63 | 68 20 73 79 73 74 65 6d | for eac|h system|
|00000780| 2e 20 20 42 61 74 63 68 | 65 72 20 77 69 6c 6c 20 |. Batch|er will |
|00000790| 6e 6f 74 20 69 6e 76 6f | 6b 65 20 74 68 65 20 72 |not invo|ke the r|
|000007a0| 65 61 6c 20 62 61 74 63 | 68 69 6e 67 20 0a 58 09 |eal batc|hing .X.|
|000007b0| 20 20 20 73 6f 66 74 77 | 61 72 65 20 75 6e 6c 65 | softw|are unle|
|000007c0| 73 73 20 61 6e 64 20 75 | 6e 74 69 6c 20 74 68 65 |ss and u|ntil the|
|000007d0| 20 55 55 43 50 20 71 75 | 65 75 65 20 73 69 7a 65 | UUCP qu|eue size|
|000007e0| 20 66 6f 72 20 74 68 61 | 74 20 73 69 74 65 20 0a | for tha|t site .|
|000007f0| 58 09 20 20 20 69 73 20 | 62 65 6c 6f 77 20 74 68 |X. is |below th|
|00000800| 69 73 20 6c 69 6d 69 74 | 2e 20 20 49 66 20 74 68 |is limit|. If th|
|00000810| 65 20 71 75 65 75 65 20 | 66 6f 72 20 61 20 73 70 |e queue |for a sp|
|00000820| 65 63 69 66 69 63 20 73 | 79 73 74 65 6d 0a 58 09 |ecific s|ystem.X.|
|00000830| 20 20 20 67 72 6f 77 73 | 20 61 62 6f 76 65 20 74 | grows| above t|
|00000840| 68 69 73 20 6c 65 6e 67 | 74 68 2c 20 74 68 65 20 |his leng|th, the |
|00000850| 62 61 74 63 68 20 66 69 | 6c 65 20 77 69 6c 6c 20 |batch fi|le will |
|00000860| 62 65 20 6c 65 66 74 20 | 75 6e 74 6f 75 63 68 65 |be left |untouche|
|00000870| 64 0a 58 09 20 20 20 61 | 6e 64 20 77 69 6c 6c 20 |d.X. a|nd will |
|00000880| 6f 6e 6c 79 20 62 65 20 | 70 72 6f 63 65 73 73 65 |only be |processe|
|00000890| 64 20 77 68 65 6e 20 74 | 68 65 20 64 6f 77 6e 73 |d when t|he downs|
|000008a0| 74 72 65 61 6d 20 6d 61 | 6e 61 67 65 73 20 74 6f |tream ma|nages to|
|000008b0| 0a 58 09 20 20 20 62 72 | 69 6e 67 20 74 68 65 20 |.X. br|ing the |
|000008c0| 71 75 65 75 65 20 73 69 | 7a 65 20 62 61 63 6b 20 |queue si|ze back |
|000008d0| 64 6f 77 6e 20 62 65 6c | 6f 77 20 74 68 65 20 6c |down bel|ow the l|
|000008e0| 69 6d 69 74 2e 0a 58 0a | 58 09 20 20 20 54 68 69 |imit..X.|X. Thi|
|000008f0| 73 20 69 73 20 64 6f 6e | 65 20 62 79 20 22 70 6f |s is don|e by "po|
|00000900| 70 65 6e 28 22 75 75 71 | 20 2d 6c 20 2d 73 3c 73 |pen("uuq| -l -s<s|
|00000910| 69 74 65 6e 61 6d 65 3e | 22 2c 20 22 72 22 29 22 |itename>|", "r")"|
|00000920| 20 74 6f 0a 58 09 20 20 | 20 66 69 6e 64 20 6f 75 | to.X. | find ou|
|00000930| 74 20 74 68 65 20 73 69 | 7a 65 20 6f 66 20 74 68 |t the si|ze of th|
|00000940| 65 20 71 75 65 75 65 20 | 66 6f 72 20 74 68 65 20 |e queue |for the |
|00000950| 73 69 74 65 2e 20 20 4e | 6f 6e 20 34 2e 33 20 55 |site. N|on 4.3 U|
|00000960| 55 43 50 0a 58 09 20 20 | 20 63 61 6e 20 70 72 6f |UCP.X. | can pro|
|00000970| 62 61 62 6c 79 20 77 72 | 69 74 65 20 74 68 65 69 |bably wr|ite thei|
|00000980| 72 20 6f 77 6e 20 66 75 | 6e 63 74 69 6f 6e 20 74 |r own fu|nction t|
|00000990| 6f 20 73 63 61 6e 20 74 | 68 65 20 0a 58 09 20 20 |o scan t|he .X. |
|000009a0| 20 2f 75 73 72 2f 73 70 | 6f 6f 6c 2f 75 75 63 70 | /usr/sp|ool/uucp|
|000009b0| 27 73 20 22 43 2e 22 20 | 66 69 6c 65 73 20 74 6f |'s "C." |files to|
|000009c0| 20 66 69 67 67 65 72 20 | 6f 75 74 20 68 6f 77 20 | figger |out how |
|000009d0| 62 69 67 20 74 68 65 20 | 71 75 65 75 65 0a 58 09 |big the |queue.X.|
|000009e0| 20 20 20 69 73 20 66 6f | 72 20 61 20 73 70 65 63 | is fo|r a spec|
|000009f0| 69 66 69 63 20 73 79 73 | 74 65 6d 2e 0a 58 0a 58 |ific sys|tem..X.X|
|00000a00| 09 20 20 20 49 66 20 79 | 6f 75 20 64 6f 6e 27 74 |. If y|ou don't|
|00000a10| 20 68 61 76 65 20 61 20 | 77 61 79 20 74 6f 20 64 | have a |way to d|
|00000a20| 65 74 65 72 6d 69 6e 65 | 20 71 75 65 75 65 20 73 |etermine| queue s|
|00000a30| 69 7a 65 2c 20 75 6e 64 | 65 66 20 22 55 55 51 22 |ize, und|ef "UUQ"|
|00000a40| 0a 58 09 20 20 20 69 6e | 20 62 61 74 63 68 65 72 |.X. in| batcher|
|00000a50| 2e 63 2e 20 20 28 34 29 | 20 62 65 6c 6f 77 20 77 |.c. (4)| below w|
|00000a60| 69 6c 6c 20 61 6c 6c 65 | 76 69 61 74 65 20 74 68 |ill alle|viate th|
|00000a70| 65 20 6c 61 63 6b 20 6f | 66 20 74 68 69 73 0a 58 |e lack o|f this.X|
|00000a80| 09 20 20 20 66 75 6e 63 | 74 69 6f 6e 2c 20 62 75 |. func|tion, bu|
|00000a90| 74 20 79 6f 75 20 6d 61 | 79 20 68 61 76 65 20 61 |t you ma|y have a|
|00000aa0| 20 6e 65 74 77 6f 72 6b | 20 63 6c 6f 67 20 69 66 | network| clog if|
|00000ab0| 20 6f 6e 65 20 6f 66 20 | 79 6f 75 72 0a 58 09 20 | one of |your.X. |
|00000ac0| 20 20 64 6f 77 6e 73 74 | 72 65 61 6d 73 20 64 69 | downst|reams di|
|00000ad0| 65 73 20 61 6e 64 20 75 | 73 65 73 20 75 70 20 74 |es and u|ses up t|
|00000ae0| 68 65 20 72 65 73 74 20 | 6f 66 20 74 68 65 20 73 |he rest |of the s|
|00000af0| 70 6f 6f 6c 20 61 72 65 | 61 2e 0a 58 0a 58 09 34 |pool are|a..X.X.4|
|00000b00| 29 20 49 66 20 79 6f 75 | 20 61 72 65 20 72 75 6e |) If you| are run|
|00000b10| 6e 69 6e 67 20 6f 6e 20 | 61 20 34 2e 78 20 42 53 |ning on |a 4.x BS|
|00000b20| 44 20 73 79 73 74 65 6d | 2c 20 62 61 74 63 68 65 |D system|, batche|
|00000b30| 72 20 77 69 6c 6c 20 61 | 6c 73 6f 0a 58 09 20 20 |r will a|lso.X. |
|00000b40| 20 6e 6f 74 20 69 6e 76 | 6f 6b 65 20 74 68 65 20 | not inv|oke the |
|00000b50| 72 65 61 6c 20 62 61 74 | 63 68 69 6e 67 20 73 6f |real bat|ching so|
|00000b60| 66 74 77 61 72 65 20 69 | 66 20 74 68 65 20 61 6d |ftware i|f the am|
|00000b70| 6f 75 6e 74 20 6f 66 0a | 58 09 20 20 20 73 70 61 |ount of.|X. spa|
|00000b80| 63 65 20 69 6e 20 74 68 | 65 20 55 55 43 50 20 73 |ce in th|e UUCP s|
|00000b90| 70 6f 6f 6c 20 61 72 65 | 61 20 69 73 20 62 65 6c |pool are|a is bel|
|00000ba0| 6f 77 20 35 20 4d 62 2e | 20 20 54 68 69 73 20 69 |ow 5 Mb.| This i|
|00000bb0| 73 20 64 6f 6e 65 0a 58 | 09 20 20 20 62 79 20 64 |s done.X|. by d|
|00000bc0| 6f 69 6e 67 20 61 20 22 | 64 66 20 2f 75 73 72 2f |oing a "|df /usr/|
|00000bd0| 73 70 6f 6f 6c 2f 75 75 | 63 70 22 2c 20 77 68 69 |spool/uu|cp", whi|
|00000be0| 63 68 20 49 20 62 65 6c | 69 65 76 65 20 6f 6e 6c |ch I bel|ieve onl|
|00000bf0| 79 0a 58 09 20 20 20 77 | 6f 72 6b 73 20 6f 6e 20 |y.X. w|orks on |
|00000c00| 34 2e 32 20 6f 72 20 34 | 2e 33 20 42 53 44 2e 20 |4.2 or 4|.3 BSD. |
|00000c10| 20 4b 6c 75 64 67 69 6e | 67 20 74 68 69 73 20 66 | Kludgin|g this f|
|00000c20| 6f 72 20 73 79 73 74 65 | 6d 73 0a 58 09 20 20 20 |or syste|ms.X. |
|00000c30| 77 68 65 72 65 20 22 64 | 66 20 3c 66 69 6c 65 3e |where "d|f <file>|
|00000c40| 22 20 64 6f 65 73 6e 27 | 74 20 77 6f 72 6b 20 73 |" doesn'|t work s|
|00000c50| 68 6f 75 6c 64 6e 27 74 | 20 62 65 20 74 6f 6f 20 |houldn't| be too |
|00000c60| 68 61 72 64 2e 0a 58 09 | 20 20 20 49 66 20 79 6f |hard..X.| If yo|
|00000c70| 75 20 63 61 6e 27 74 20 | 64 6f 20 74 68 69 73 2c |u can't |do this,|
|00000c80| 20 75 6e 64 65 66 20 22 | 44 46 41 42 4c 45 22 0a | undef "|DFABLE".|
|00000c90| 58 0a 58 20 20 20 20 4e | 6f 74 65 3a 20 74 68 65 |X.X N|ote: the|
|00000ca0| 20 63 68 65 63 6b 73 20 | 66 6f 72 20 28 33 29 20 | checks |for (3) |
|00000cb0| 61 6e 64 20 28 34 29 20 | 61 72 65 20 64 6f 6e 65 |and (4) |are done|
|00000cc0| 20 61 66 74 65 72 20 65 | 61 63 68 20 62 61 74 63 | after e|ach batc|
|00000cd0| 68 20 69 73 0a 58 20 20 | 20 20 63 72 65 61 74 65 |h is.X | create|
|00000ce0| 64 2e 20 20 55 73 69 6e | 67 20 75 75 71 20 61 6e |d. Usin|g uuq an|
|00000cf0| 64 20 64 66 20 69 73 20 | 6b 69 6e 64 61 20 73 6c |d df is |kinda sl|
|00000d00| 6f 77 2c 20 62 75 74 20 | 69 74 20 69 73 20 73 77 |ow, but |it is sw|
|00000d10| 61 6d 70 65 64 0a 58 20 | 20 20 20 62 79 20 74 68 |amped.X | by th|
|00000d20| 65 20 65 78 65 63 75 74 | 69 6f 6e 20 6f 66 20 74 |e execut|ion of t|
|00000d30| 68 65 20 62 61 74 63 68 | 69 6e 67 20 69 74 73 65 |he batch|ing itse|
|00000d40| 6c 66 2e 0a 58 0a 58 20 | 20 20 20 49 27 64 20 72 |lf..X.X | I'd r|
|00000d50| 65 63 6f 6d 6d 65 6e 64 | 20 6c 6f 6f 6b 69 6e 67 |ecommend| looking|
|00000d60| 20 61 74 20 74 68 65 20 | 66 69 72 73 74 20 62 69 | at the |first bi|
|00000d70| 74 20 6f 66 20 62 61 74 | 63 68 65 72 2e 63 20 62 |t of bat|cher.c b|
|00000d80| 65 66 6f 72 65 20 72 75 | 6e 6e 69 6e 67 0a 58 20 |efore ru|nning.X |
|00000d90| 20 20 20 74 68 65 20 6d | 61 6b 65 66 69 6c 65 20 | the m|akefile |
|00000da0| 28 53 56 20 6d 61 6b 65 | 20 6f 6e 6c 79 2c 20 79 |(SV make| only, y|
|00000db0| 6f 75 20 6d 61 79 20 68 | 61 76 65 20 74 6f 20 66 |ou may h|ave to f|
|00000dc0| 75 64 67 65 20 61 20 62 | 69 74 20 66 6f 72 20 42 |udge a b|it for B|
|00000dd0| 53 44 29 2e 0a 58 0a 58 | 54 68 69 73 20 73 6f 66 |SD)..X.X|This sof|
|00000de0| 74 77 61 72 65 20 68 61 | 73 20 6d 61 64 65 20 61 |tware ha|s made a|
|00000df0| 6e 20 69 6e 63 72 65 64 | 69 62 6c 65 20 64 69 66 |n incred|ible dif|
|00000e00| 66 65 72 65 6e 63 65 20 | 6f 6e 20 74 68 69 73 20 |ference |on this |
|00000e10| 73 69 74 65 2e 0a 58 57 | 65 20 67 69 76 65 20 66 |site..XW|e give f|
|00000e20| 75 6c 6c 20 66 65 65 64 | 73 20 74 6f 20 37 20 73 |ull feed|s to 7 s|
|00000e30| 69 74 65 73 2c 20 70 6c | 75 73 20 73 6d 61 6c 6c |ites, pl|us small|
|00000e40| 65 72 20 6f 6e 65 73 20 | 74 6f 20 61 62 6f 75 74 |er ones |to about|
|00000e50| 20 61 6e 6f 74 68 65 72 | 0a 58 31 30 2e 20 20 55 | another|.X10. U|
|00000e60| 6e 74 69 6c 20 74 68 69 | 73 20 77 61 73 20 69 6e |ntil thi|s was in|
|00000e70| 73 74 61 6c 6c 65 64 2c | 20 77 65 20 68 61 64 20 |stalled,| we had |
|00000e80| 74 6f 20 64 69 73 61 62 | 6c 65 20 62 61 74 63 68 |to disab|le batch|
|00000e90| 69 6e 67 20 74 6f 0a 58 | 6f 6e 65 20 73 69 74 65 |ing to.X|one site|
|00000ea0| 20 6f 72 20 61 6e 6f 74 | 68 65 72 20 65 76 65 72 | or anot|her ever|
|00000eb0| 79 20 73 65 63 6f 6e 64 | 20 64 61 79 2e 20 20 41 |y second| day. A|
|00000ec0| 6e 64 20 77 65 20 62 6c | 65 77 20 73 70 6f 6f 6c |nd we bl|ew spool|
|00000ed0| 20 61 72 65 61 73 20 6f | 6e 20 0a 58 77 65 65 6b | areas o|n .Xweek|
|00000ee0| 65 6e 64 73 2e 20 20 57 | 65 20 68 61 76 65 6e 27 |ends. W|e haven'|
|00000ef0| 74 20 68 61 64 20 74 6f | 20 74 6f 75 63 68 20 2a |t had to| touch *|
|00000f00| 61 6e 79 74 68 69 6e 67 | 2a 20 73 69 6e 63 65 20 |anything|* since |
|00000f10| 74 68 69 73 20 77 61 73 | 20 69 6e 73 74 61 6c 6c |this was| install|
|00000f20| 65 64 2e 20 20 0a 58 45 | 76 65 6e 20 77 68 65 6e |ed. .XE|ven when|
|00000f30| 20 73 69 74 65 73 20 68 | 61 76 65 20 62 65 65 6e | sites h|ave been|
|00000f40| 20 75 6e 72 65 61 63 68 | 61 62 6c 65 20 66 6f 72 | unreach|able for|
|00000f50| 20 77 65 65 6b 73 20 6f | 6e 20 65 6e 64 2e 0a 58 | weeks o|n end..X|
|00000f60| 0a 58 49 27 6d 20 73 6f | 72 72 79 20 49 20 68 61 |.XI'm so|rry I ha|
|00000f70| 76 65 6e 27 74 20 62 65 | 65 6e 20 61 62 6c 65 20 |ven't be|en able |
|00000f80| 74 6f 20 77 72 69 74 65 | 20 61 20 62 65 74 74 65 |to write| a bette|
|00000f90| 72 20 73 65 74 20 6f 66 | 20 64 6f 63 75 6d 65 6e |r set of| documen|
|00000fa0| 74 61 74 69 6f 6e 2c 0a | 58 6f 72 20 73 65 6e 64 |tation,.|Xor send|
|00000fb0| 20 69 74 20 6f 66 66 20 | 74 6f 20 6d 6f 64 2e 73 | it off |to mod.s|
|00000fc0| 6f 75 72 63 65 73 2c 20 | 62 75 74 20 74 6f 6d 6f |ources, |but tomo|
|00000fd0| 72 72 6f 77 20 69 73 20 | 6d 79 20 6c 61 73 74 20 |rrow is |my last |
|00000fe0| 64 61 79 20 68 65 72 65 | 2c 20 61 6e 64 0a 58 49 |day here|, and.XI|
|00000ff0| 20 6d 61 79 20 6e 6f 74 | 20 62 65 20 61 62 6c 65 | may not| be able|
|00001000| 20 74 6f 20 67 65 74 20 | 62 61 63 6b 20 6f 6e 20 | to get |back on |
|00001010| 74 68 65 20 6e 65 74 20 | 66 6f 72 20 61 20 77 68 |the net |for a wh|
|00001020| 69 6c 65 2e 0a 58 0a 58 | 57 6f 72 6b 73 20 77 69 |ile..X.X|Works wi|
|00001030| 74 68 20 32 2e 31 30 2e | 32 20 61 6e 64 20 32 2e |th 2.10.|2 and 2.|
|00001040| 31 30 2e 33 20 6e 65 77 | 73 2e 0a 2f 0a 65 63 68 |10.3 new|s../.ech|
|00001050| 6f 20 27 78 20 2d 20 62 | 61 74 63 68 2e 63 74 72 |o 'x - b|atch.ctr|
|00001060| 6c 27 0a 73 65 64 20 27 | 73 2f 5e 58 2f 2f 27 20 |l'.sed '|s/^X//' |
|00001070| 3e 20 62 61 74 63 68 2e | 63 74 72 6c 20 3c 3c 20 |> batch.|ctrl << |
|00001080| 27 2f 27 0a 58 23 09 45 | 78 61 6d 70 6c 65 20 62 |'/'.X#.E|xample b|
|00001090| 61 74 63 68 2e 63 74 72 | 6c 20 66 69 6c 65 2e 0a |atch.ctr|l file..|
|000010a0| 58 23 09 44 65 73 63 72 | 69 70 74 69 6f 6e 3a 0a |X#.Descr|iption:.|
|000010b0| 58 23 09 31 73 74 20 66 | 69 65 6c 64 20 69 73 20 |X#.1st f|ield is |
|000010c0| 6e 61 6d 65 2e 0a 58 23 | 09 32 6e 64 20 66 69 65 |name..X#|.2nd fie|
|000010d0| 6c 64 20 69 73 20 22 63 | 6c 61 73 73 22 3b 20 22 |ld is "c|lass"; "|
|000010e0| 62 61 74 63 68 65 72 20 | 2d 63 3c 43 3e 22 20 77 |batcher |-c<C>" w|
|000010f0| 69 6c 6c 20 64 6f 20 61 | 6c 6c 20 74 68 6f 73 65 |ill do a|ll those|
|00001100| 0a 58 23 09 20 20 20 20 | 73 79 73 74 65 6d 73 20 |.X#. |systems |
|00001110| 77 69 74 68 20 63 6c 61 | 73 73 20 3c 43 3e 2e 20 |with cla|ss <C>. |
|00001120| 20 44 65 66 61 75 6c 74 | 20 69 73 20 22 7a 22 2e | Default| is "z".|
|00001130| 0a 58 23 09 33 72 64 20 | 66 69 65 6c 64 20 69 73 |.X#.3rd |field is|
|00001140| 20 22 63 6f 6d 70 72 65 | 73 73 20 6c 69 6e 65 22 | "compre|ss line"|
|00001150| 2e 0a 58 23 09 09 44 65 | 66 61 75 6c 74 20 69 73 |..X#..De|fault is|
|00001160| 20 6e 6f 20 63 6f 6d 70 | 72 65 73 73 0a 58 23 09 | no comp|ress.X#.|
|00001170| 09 70 6c 61 63 65 69 6e | 67 20 73 6f 6d 65 74 68 |.placein|g someth|
|00001180| 69 6e 67 20 68 65 72 65 | 20 75 73 65 73 20 74 68 |ing here| uses th|
|00001190| 69 73 20 61 73 20 61 6e | 20 69 6e 74 65 72 6d 65 |is as an| interme|
|000011a0| 64 69 61 74 65 0a 58 23 | 09 09 70 69 70 65 2e 20 |diate.X#|..pipe. |
|000011b0| 20 49 66 20 79 6f 75 20 | 75 73 65 20 63 6f 6d 70 | If you |use comp|
|000011c0| 72 65 73 73 2c 20 77 69 | 74 68 20 6e 6f 20 75 75 |ress, wi|th no uu|
|000011d0| 78 20 66 69 65 6c 64 2c | 20 74 68 65 0a 58 23 09 |x field,| the.X#.|
|000011e0| 09 64 65 66 61 75 6c 74 | 20 69 73 20 75 75 78 20 |.default| is uux |
|000011f0| 2e 2e 2e 2e 20 21 63 75 | 6e 62 61 74 63 68 0a 58 |.... !cu|nbatch.X|
|00001200| 23 09 09 59 6f 75 20 63 | 61 6e 20 74 68 72 6f 77 |#..You c|an throw|
|00001210| 20 69 6e 20 6f 74 68 65 | 72 20 63 6f 6d 70 72 65 | in othe|r compre|
|00001220| 73 73 20 61 72 67 75 6d | 65 6e 74 73 20 68 65 72 |ss argum|ents her|
|00001230| 65 2e 0a 58 23 09 34 74 | 68 20 66 69 65 6c 64 20 |e..X#.4t|h field |
|00001240| 69 73 20 75 75 78 20 66 | 6c 61 67 73 2e 20 20 64 |is uux f|lags. d|
|00001250| 65 66 61 75 6c 74 20 69 | 73 3a 20 2d 72 20 2d 7a |efault i|s: -r -z|
|00001260| 20 2d 67 64 0a 58 23 09 | 09 28 64 6f 20 6e 6f 74 | -gd.X#.|.(do not|
|00001270| 20 73 74 61 72 74 20 75 | 75 63 69 63 6f 2c 20 6f | start u|ucico, o|
|00001280| 6e 6c 79 20 72 65 6d 6f | 74 65 20 61 63 6b 6e 6f |nly remo|te ackno|
|00001290| 77 6c 65 64 67 65 20 6f | 66 20 66 61 69 6c 75 72 |wledge o|f failur|
|000012a0| 65 73 2c 0a 58 23 09 09 | 67 72 61 64 65 20 44 29 |es,.X#..|grade D)|
|000012b0| 0a 58 23 09 35 74 68 20 | 66 69 65 6c 64 20 69 73 |.X#.5th |field is|
|000012c0| 20 73 69 7a 65 20 6f 66 | 20 62 61 74 63 68 65 73 | size of| batches|
|000012d0| 2e 20 20 44 65 66 61 75 | 6c 74 20 31 30 30 4b 2e |. Defau|lt 100K.|
|000012e0| 0a 58 23 09 36 74 68 20 | 66 69 65 6c 64 20 69 73 |.X#.6th |field is|
|000012f0| 20 6d 61 78 20 71 75 65 | 75 65 20 73 69 7a 65 2e | max que|ue size.|
|00001300| 20 20 44 65 66 61 75 6c | 74 20 35 30 30 4b 0a 58 | Defaul|t 500K.X|
|00001310| 23 09 37 74 68 20 66 69 | 65 6c 64 3a 20 63 6f 6d |#.7th fi|eld: com|
|00001320| 70 6c 65 74 65 20 75 75 | 78 20 6c 69 6e 65 20 72 |plete uu|x line r|
|00001330| 65 70 6c 61 63 65 6d 65 | 6e 74 2e 0a 58 23 09 64 |eplaceme|nt..X#.d|
|00001340| 65 66 61 75 6c 74 3a 20 | 22 75 75 78 20 2d 20 3c |efault: |"uux - <|
|00001350| 75 75 78 66 6c 61 67 73 | 3e 20 6e 6f 64 65 6e 61 |uuxflags|> nodena|
|00001360| 6d 65 21 3c 75 6e 62 61 | 74 63 68 7c 63 75 6e 62 |me!<unba|tch|cunb|
|00001370| 61 74 63 68 3e 22 0a 58 | 23 0a 58 23 09 49 66 20 |atch>".X|#.X#.If |
|00001380| 61 20 6e 61 6d 65 20 64 | 6f 65 73 20 6e 6f 74 20 |a name d|oes not |
|00001390| 65 78 69 73 74 2c 20 62 | 61 74 63 68 65 72 20 77 |exist, b|atcher w|
|000013a0| 6f 6e 27 74 20 73 65 6e | 64 20 61 20 62 61 74 63 |on't sen|d a batc|
|000013b0| 68 2e 0a 58 23 0a 58 23 | 09 4e 6f 72 6d 61 6c 20 |h..X#.X#|.Normal |
|000013c0| 6e 65 77 73 20 66 65 65 | 64 73 3a 0a 58 67 65 6e |news fee|ds:.Xgen|
|000013d0| 61 74 3a 3a 63 6f 6d 70 | 72 65 73 73 20 2d 43 3a |at::comp|ress -C:|
|000013e0| 3a 3a 3a 0a 58 75 74 63 | 73 3a 3a 63 6f 6d 70 72 |:::.Xutc|s::compr|
|000013f0| 65 73 73 20 2d 43 3a 3a | 3a 3a 0a 58 72 61 64 68 |ess -C::|::.Xradh|
|00001400| 61 3a 3a 63 6f 6d 70 72 | 65 73 73 3a 3a 3a 3a 0a |a::compr|ess::::.|
|00001410| 58 74 6f 72 61 6d 3a 3a | 63 6f 6d 70 72 65 73 73 |Xtoram::|compress|
|00001420| 3a 2d 6e 20 2d 72 20 2d | 67 64 3a 3a 3a 0a 58 79 |:-n -r -|gd:::.Xy|
|00001430| 65 74 74 69 3a 7a 3a 63 | 6f 6d 70 72 65 73 73 20 |etti:z:c|ompress |
|00001440| 2d 43 3a 3a 3a 3a 0a 58 | 6c 73 75 63 3a 3a 63 6f |-C::::.X|lsuc::co|
|00001450| 6d 70 72 65 73 73 20 2d | 43 20 2d 62 20 31 33 3a |mpress -|C -b 13:|
|00001460| 3a 3a 3a 0a 58 6d 69 63 | 6f 6d 76 61 78 3a 3a 3a |:::.Xmic|omvax:::|
|00001470| 3a 3a 3a 0a 58 23 09 6e | 65 77 20 6e 65 77 73 20 |:::.X#.n|ew news |
|00001480| 66 65 65 64 20 63 6f 6d | 69 6e 67 20 75 70 0a 58 |feed com|ing up.X|
|00001490| 73 79 6e 74 72 6f 6e 3a | 3a 63 6f 6d 70 72 65 73 |syntron:|:compres|
|000014a0| 73 20 2d 43 3a 3a 3a 3a | 0a 58 23 09 4d 6f 74 20 |s -C::::|.X#.Mot |
|000014b0| 6e 65 77 73 20 66 65 65 | 64 73 3a 0a 58 6d 6f 74 |news fee|ds:.Xmot|
|000014c0| 73 6a 31 3a 41 3a 3a 2d | 6e 20 2d 72 20 25 67 64 |sj1:A::-|n -r %gd|
|000014d0| 32 32 32 50 65 67 74 32 | 41 32 32 25 66 20 25 72 |222Pegt2|A22%f %r|
|000014e0| 20 25 67 64 32 32 32 50 | 23 63 50 20 66 65 77 73 | %gd222P|#cP fews|
|000014f0| 20 66 65 65 64 73 32 50 | 23 63 70 65 64 32 41 32 | feeds2P|#cped2A2|
|00001500| 32 25 66 20 25 67 42 32 | 32 32 50 63 70 60 71 32 |2%f %gB2|22Pcp`q2|
|00001510| 41 32 32 25 66 20 25 67 | 42 32 32 32 50 63 70 73 |A22%f %g|B222Pcps|
|00001520| 65 61 32 41 32 32 25 66 | 20 25 67 42 32 32 32 50 |ea2A22%f| %gB222P|
|00001530| 63 70 6d 7b 6f 3a 49 3a | 6b 6f 6d 78 7a 6d 7b 73 |cpm{o:I:|komxzm{s|
|00001540| 20 2d 43 3a 2d 6e 20 2d | 67 42 3a 3a 3a 0a 58 63 | -C:-n -|gB:::.Xc|
|00001550| 78 73 63 68 3a 41 3a 3a | 3a 32 30 30 30 30 3a 3a |xsch:A::|:20000::|
|00001560| 6d 61 69 6c 20 63 78 73 | 63 68 21 65 77 61 0a 58 |mail cxs|ch!ewa.X|
|00001570| 63 78 74 65 78 3a 41 3a | 3a 3a 32 30 30 30 30 3a |cxtex:A:|::20000:|
|00001580| 3a 6d 61 69 6c 20 63 78 | 74 65 78 21 63 78 6d 61 |:mail cx|tex!cxma|
|00001590| 69 6c 0a 58 63 78 70 68 | 78 3a 41 3a 3a 3a 32 30 |il.Xcxph|x:A:::20|
|000015a0| 30 30 30 3a 3a 6d 61 69 | 6c 20 63 78 70 68 78 21 |000::mai|l cxphx!|
|000015b0| 6e 6d 73 0a 58 63 78 6d | 64 3a 41 3a 3a 3a 32 30 |nms.Xcxm|d:A:::20|
|000015c0| 30 30 30 3a 3a 6d 61 69 | 6c 20 63 78 6d 64 21 6a |000::mai|l cxmd!j|
|000015d0| 6f 65 0a 58 74 65 73 74 | 3a 41 3a 3a 3a 3a 3a 6d |oe.Xtest|:A:::::m|
|000015e0| 61 69 6c 20 63 6c 65 77 | 69 73 0a 2f 0a 65 63 68 |ail clew|is./.ech|
|000015f0| 6f 20 27 78 20 2d 20 62 | 61 74 63 68 65 72 2e 63 |o 'x - b|atcher.c|
|00001600| 27 0a 73 65 64 20 27 73 | 2f 5e 58 2f 2f 27 20 3e |'.sed 's|/^X//' >|
|00001610| 20 62 61 74 63 68 65 72 | 2e 63 20 3c 3c 20 27 2f | batcher|.c << '/|
|00001620| 27 0a 58 2f 2a 09 43 68 | 72 69 73 20 4c 65 77 69 |'.X/*.Ch|ris Lewi|
|00001630| 73 2c 20 4a 75 6e 65 20 | 31 39 38 36 09 2a 2f 0a |s, June |1986.*/.|
|00001640| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |X#includ|e <stdio|
|00001650| 2e 68 3e 0a 58 23 69 66 | 09 64 65 66 69 6e 65 64 |.h>.X#if|.defined|
|00001660| 28 42 53 44 34 5f 32 29 | 20 7c 7c 20 64 65 66 69 |(BSD4_2)| || defi|
|00001670| 6e 65 64 28 42 53 44 34 | 5f 31 43 29 0a 58 23 69 |ned(BSD4|_1C).X#i|
|00001680| 6e 63 6c 75 64 65 20 3c | 73 74 72 69 6e 67 73 2e |nclude <|strings.|
|00001690| 68 3e 0a 58 23 65 6c 73 | 65 0a 58 23 69 6e 63 6c |h>.X#els|e.X#incl|
|000016a0| 75 64 65 20 3c 73 74 72 | 69 6e 67 2e 68 3e 0a 58 |ude <str|ing.h>.X|
|000016b0| 23 65 6e 64 69 66 0a 58 | 65 78 74 65 72 6e 20 63 |#endif.X|extern c|
|000016c0| 68 61 72 20 2a 6d 61 6c | 6c 6f 63 28 29 3b 0a 58 |har *mal|loc();.X|
|000016d0| 65 78 74 65 72 6e 20 76 | 6f 69 64 20 66 72 65 65 |extern v|oid free|
|000016e0| 28 29 3b 0a 58 0a 58 23 | 64 65 66 69 6e 65 09 4e |();.X.X#|define.N|
|000016f0| 55 4d 46 4c 44 53 09 37 | 0a 58 23 64 65 66 69 6e |UMFLDS.7|.X#defin|
|00001700| 65 09 4e 41 4d 45 09 30 | 0a 58 23 64 65 66 69 6e |e.NAME.0|.X#defin|
|00001710| 65 09 43 4c 41 53 53 09 | 31 0a 58 23 64 65 66 69 |e.CLASS.|1.X#defi|
|00001720| 6e 65 09 43 4f 4d 50 52 | 45 53 53 20 32 0a 58 23 |ne.COMPR|ESS 2.X#|
|00001730| 64 65 66 69 6e 65 09 55 | 55 58 46 4c 41 47 53 20 |define.U|UXFLAGS |
|00001740| 33 0a 58 23 64 65 66 69 | 6e 65 09 53 49 5a 45 09 |3.X#defi|ne.SIZE.|
|00001750| 34 0a 58 23 64 65 66 69 | 6e 65 09 51 53 49 5a 45 |4.X#defi|ne.QSIZE|
|00001760| 09 35 0a 58 23 64 65 66 | 69 6e 65 09 55 55 58 09 |.5.X#def|ine.UUX.|
|00001770| 36 0a 58 0a 58 0a 58 23 | 64 65 66 69 6e 65 09 55 |6.X.X.X#|define.U|
|00001780| 55 51 09 2f 2a 20 64 65 | 66 69 6e 65 20 74 68 69 |UQ./* de|fine thi|
|00001790| 73 20 69 66 20 79 6f 75 | 20 68 61 76 65 20 42 53 |s if you| have BS|
|000017a0| 44 20 34 2e 33 20 75 75 | 71 20 75 74 69 6c 69 74 |D 4.3 uu|q utilit|
|000017b0| 79 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 09 44 46 |y */.X#d|efine.DF|
|000017c0| 41 42 4c 45 09 2f 2a 20 | 64 65 66 69 6e 65 20 74 |ABLE./* |define t|
|000017d0| 68 69 73 20 69 66 20 22 | 64 66 20 2f 75 73 72 2f |his if "|df /usr/|
|000017e0| 73 70 6f 6f 6c 2f 75 75 | 63 70 22 20 77 6f 72 6b |spool/uu|cp" work|
|000017f0| 73 20 6f 6e 20 79 6f 75 | 72 20 73 79 73 74 65 6d |s on you|r system|
|00001800| 20 2a 2f 0a 58 0a 58 69 | 6e 74 09 66 6c 64 6c 65 | */.X.Xi|nt.fldle|
|00001810| 6e 5b 4e 55 4d 46 4c 44 | 53 5d 20 3d 20 7b 31 30 |n[NUMFLD|S] = {10|
|00001820| 2c 20 32 2c 20 32 30 2c | 20 31 30 2c 20 37 2c 20 |, 2, 20,| 10, 7, |
|00001830| 31 30 2c 20 33 30 7d 3b | 0a 58 0a 58 73 74 72 75 |10, 30};|.X.Xstru|
|00001840| 63 74 20 64 65 73 63 20 | 7b 0a 58 09 63 68 61 72 |ct desc |{.X.char|
|00001850| 20 09 09 2a 66 6c 64 73 | 5b 4e 55 4d 46 4c 44 53 | ..*flds|[NUMFLDS|
|00001860| 5d 3b 0a 58 09 73 74 72 | 75 63 74 20 64 65 73 63 |];.X.str|uct desc|
|00001870| 09 2a 6e 65 78 74 3b 0a | 58 7d 20 2a 68 65 61 64 |.*next;.|X} *head|
|00001880| 20 3d 20 28 73 74 72 75 | 63 74 20 64 65 73 63 20 | = (stru|ct desc |
|00001890| 2a 29 20 4e 55 4c 4c 2c | 20 0a 58 20 20 2a 64 70 |*) NULL,| .X *dp|
|000018a0| 74 72 20 3d 20 28 73 74 | 72 75 63 74 20 64 65 73 |tr = (st|ruct des|
|000018b0| 63 20 2a 29 20 4e 55 4c | 4c 3b 0a 58 0a 58 23 69 |c *) NUL|L;.X.X#i|
|000018c0| 66 09 64 65 66 69 6e 65 | 64 28 42 53 44 34 5f 32 |f.define|d(BSD4_2|
|000018d0| 29 20 7c 7c 20 64 65 66 | 69 6e 65 64 28 42 53 44 |) || def|ined(BSD|
|000018e0| 34 5f 31 43 29 0a 58 23 | 64 65 66 69 6e 65 09 73 |4_1C).X#|define.s|
|000018f0| 74 72 63 68 72 09 69 6e | 64 65 78 0a 58 23 65 6e |trchr.in|dex.X#en|
|00001900| 64 69 66 0a 58 0a 58 23 | 69 66 64 65 66 09 44 45 |dif.X.X#|ifdef.DE|
|00001910| 42 55 47 0a 58 23 64 65 | 66 69 6e 65 09 42 41 54 |BUG.X#de|fine.BAT|
|00001920| 43 48 43 54 52 4c 09 22 | 62 61 74 63 68 2e 63 74 |CHCTRL."|batch.ct|
|00001930| 72 6c 22 0a 58 23 65 6c | 73 65 0a 58 23 64 65 66 |rl".X#el|se.X#def|
|00001940| 69 6e 65 09 42 41 54 43 | 48 43 54 52 4c 09 22 2f |ine.BATC|HCTRL."/|
|00001950| 75 73 72 2f 6c 69 62 2f | 6e 65 77 73 2f 62 61 74 |usr/lib/|news/bat|
|00001960| 63 68 2e 63 74 72 6c 22 | 0a 58 23 65 6e 64 69 66 |ch.ctrl"|.X#endif|
|00001970| 0a 58 0a 58 23 64 65 66 | 69 6e 65 09 42 41 54 43 |.X.X#def|ine.BATC|
|00001980| 48 09 22 2f 75 73 72 2f | 73 70 6f 6f 6c 2f 62 61 |H."/usr/|spool/ba|
|00001990| 74 63 68 22 0a 58 23 64 | 65 66 69 6e 65 09 53 42 |tch".X#d|efine.SB|
|000019a0| 41 54 43 48 09 22 2f 75 | 73 72 2f 6c 69 62 2f 6e |ATCH."/u|sr/lib/n|
|000019b0| 65 77 73 2f 62 61 74 63 | 68 22 0a 58 0a 58 73 74 |ews/batc|h".X.Xst|
|000019c0| 72 75 63 74 20 64 65 73 | 63 20 2a 67 65 74 66 6c |ruct des|c *getfl|
|000019d0| 64 73 28 29 3b 0a 58 0a | 58 69 6e 74 09 76 65 72 |ds();.X.|Xint.ver|
|000019e0| 62 6f 73 65 20 3d 20 30 | 3b 0a 58 69 6e 74 09 63 |bose = 0|;.Xint.c|
|000019f0| 6c 61 73 73 3b 0a 58 69 | 6e 74 09 73 70 6f 6f 6c |lass;.Xi|nt.spool|
|00001a00| 6f 6b 20 3d 20 31 3b 0a | 58 0a 58 6c 6f 6e 67 09 |ok = 1;.|X.Xlong.|
|00001a10| 73 70 6f 6f 6c 6c 69 6d | 20 3d 20 35 30 30 30 30 |spoollim| = 50000|
|00001a20| 30 30 3b 0a 58 0a 58 2f | 2a 0a 58 20 2a 09 6d 61 |00;.X.X/|*.X *.ma|
|00001a30| 69 6e 3a 0a 58 20 2a 09 | 09 2d 20 70 72 6f 63 65 |in:.X *.|.- proce|
|00001a40| 73 73 20 61 72 67 75 6d | 65 6e 74 73 0a 58 20 2a |ss argum|ents.X *|
|00001a50| 09 09 2d 20 72 65 61 64 | 20 63 6f 6e 74 72 6f 6c |..- read| control|
|00001a60| 20 66 69 6c 65 0a 58 20 | 2a 09 09 2d 20 66 6f 72 | file.X |*..- for|
|00001a70| 20 65 61 63 68 20 73 79 | 73 74 65 6d 20 73 65 6c | each sy|stem sel|
|00001a80| 65 63 74 65 64 2c 20 73 | 65 65 20 69 66 20 74 68 |ected, s|ee if th|
|00001a90| 65 72 65 20 69 73 20 61 | 6e 79 20 77 6f 72 6b 2c |ere is a|ny work,|
|00001aa0| 0a 58 20 2a 09 09 20 20 | 20 20 69 66 20 73 6f 2c |.X *.. | if so,|
|00001ab0| 20 67 6f 20 74 72 79 20 | 74 6f 20 64 6f 20 69 74 | go try |to do it|
|00001ac0| 2e 0a 58 20 2a 2f 0a 58 | 0a 58 6d 61 69 6e 28 61 |..X */.X|.Xmain(a|
|00001ad0| 72 67 63 2c 20 61 72 67 | 76 29 0a 58 69 6e 74 09 |rgc, arg|v).Xint.|
|00001ae0| 61 72 67 63 3b 0a 58 63 | 68 61 72 09 2a 2a 61 72 |argc;.Xc|har.**ar|
|00001af0| 67 76 3b 20 7b 0a 58 09 | 72 65 67 69 73 74 65 72 |gv; {.X.|register|
|00001b00| 20 63 68 61 72 20 2a 70 | 3b 0a 58 09 72 65 67 69 | char *p|;.X.regi|
|00001b10| 73 74 65 72 20 73 74 72 | 75 63 74 20 64 65 73 63 |ster str|uct desc|
|00001b20| 20 2a 63 75 72 70 74 72 | 3b 0a 58 09 61 72 67 63 | *curptr|;.X.argc|
|00001b30| 2d 2d 3b 20 61 72 67 76 | 2b 2b 3b 0a 58 09 66 6f |--; argv|++;.X.fo|
|00001b40| 72 20 28 3b 61 72 67 63 | 20 3e 20 30 20 26 26 20 |r (;argc| > 0 && |
|00001b50| 2a 2a 61 72 67 76 20 3d | 3d 20 27 2d 27 3b 20 61 |**argv =|= '-'; a|
|00001b60| 72 67 76 2b 2b 29 20 7b | 0a 58 09 09 66 6f 72 20 |rgv++) {|.X..for |
|00001b70| 28 70 20 3d 20 28 2a 61 | 72 67 76 29 2b 31 3b 20 |(p = (*a|rgv)+1; |
|00001b80| 2a 70 3b 20 70 2b 2b 29 | 0a 58 09 09 09 73 77 69 |*p; p++)|.X...swi|
|00001b90| 74 63 68 28 2a 70 29 20 | 7b 0a 58 09 09 09 09 63 |tch(*p) |{.X....c|
|00001ba0| 61 73 65 20 27 76 27 3a | 0a 58 09 09 09 09 09 76 |ase 'v':|.X.....v|
|00001bb0| 65 72 62 6f 73 65 20 3d | 20 31 3b 0a 58 09 09 09 |erbose =| 1;.X...|
|00001bc0| 09 09 62 72 65 61 6b 3b | 0a 58 09 09 09 09 63 61 |..break;|.X....ca|
|00001bd0| 73 65 20 27 63 27 3a 0a | 58 09 09 09 09 09 63 6c |se 'c':.|X.....cl|
|00001be0| 61 73 73 20 3d 20 2a 28 | 70 2b 31 29 3b 0a 58 09 |ass = *(|p+1);.X.|
|00001bf0| 09 09 09 09 69 66 20 28 | 63 6c 61 73 73 20 3d 3d |....if (|class ==|
|00001c00| 20 30 29 0a 58 09 09 09 | 09 09 09 63 6c 61 73 73 | 0).X...|...class|
|00001c10| 20 3d 20 27 7a 27 3b 0a | 58 09 09 09 09 09 65 6c | = 'z';.|X.....el|
|00001c20| 73 65 0a 58 09 09 09 09 | 09 09 70 2b 2b 3b 0a 58 |se.X....|..p++;.X|
|00001c30| 09 09 09 09 09 62 72 65 | 61 6b 3b 0a 58 09 09 09 |.....bre|ak;.X...|
|00001c40| 09 64 65 66 61 75 6c 74 | 3a 0a 58 09 09 09 09 09 |.default|:.X.....|
|00001c50| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 20 |fprintf(|stderr, |
|00001c60| 22 62 61 74 63 68 65 72 | 3a 20 42 61 64 20 61 72 |"batcher|: Bad ar|
|00001c70| 67 20 25 73 5c 6e 22 2c | 20 2a 61 72 67 76 29 3b |g %s\n",| *argv);|
|00001c80| 0a 58 09 09 09 09 09 65 | 78 69 74 28 31 29 3b 0a |.X.....e|xit(1);.|
|00001c90| 58 09 09 09 7d 0a 58 09 | 7d 0a 58 09 72 65 61 64 |X...}.X.|}.X.read|
|00001ca0| 63 74 72 6c 28 29 3b 0a | 58 09 69 66 20 28 21 63 |ctrl();.|X.if (!c|
|00001cb0| 68 65 63 6b 73 70 6f 6f | 6c 28 29 29 20 7b 0a 58 |heckspoo|l()) {.X|
|00001cc0| 09 09 65 78 69 74 28 30 | 29 3b 0a 58 09 7d 0a 58 |..exit(0|);.X.}.X|
|00001cd0| 09 69 66 20 28 76 65 72 | 62 6f 73 65 29 0a 58 09 |.if (ver|bose).X.|
|00001ce0| 09 64 75 6d 70 63 74 72 | 6c 28 29 3b 0a 58 09 69 |.dumpctr|l();.X.i|
|00001cf0| 66 20 28 63 6c 61 73 73 | 29 20 7b 0a 58 09 09 66 |f (class|) {.X..f|
|00001d00| 6f 72 20 28 63 75 72 70 | 74 72 20 3d 20 68 65 61 |or (curp|tr = hea|
|00001d10| 64 3b 20 63 75 72 70 74 | 72 20 26 26 20 73 70 6f |d; curpt|r && spo|
|00001d20| 6f 6c 6f 6b 3b 20 63 75 | 72 70 74 72 20 3d 20 63 |olok; cu|rptr = c|
|00001d30| 75 72 70 74 72 2d 3e 6e | 65 78 74 29 20 7b 0a 58 |urptr->n|ext) {.X|
|00001d40| 09 09 09 69 66 20 28 2a | 28 63 75 72 70 74 72 2d |...if (*|(curptr-|
|00001d50| 3e 66 6c 64 73 5b 43 4c | 41 53 53 5d 29 20 3d 3d |>flds[CL|ASS]) ==|
|00001d60| 20 63 6c 61 73 73 20 26 | 26 0a 58 09 09 09 09 28 | class &|&.X....(|
|00001d70| 63 68 6b 62 61 74 63 68 | 28 63 75 72 70 74 72 2d |chkbatch|(curptr-|
|00001d80| 3e 66 6c 64 73 5b 4e 41 | 4d 45 5d 2c 20 22 22 29 |>flds[NA|ME], "")|
|00001d90| 20 7c 7c 20 0a 58 09 09 | 09 09 63 68 6b 62 61 74 | || .X..|..chkbat|
|00001da0| 63 68 28 63 75 72 70 74 | 72 2d 3e 66 6c 64 73 5b |ch(curpt|r->flds[|
|00001db0| 4e 41 4d 45 5d 2c 20 22 | 2e 77 6f 72 6b 22 29 29 |NAME], "|.work"))|
|00001dc0| 20 26 26 0a 58 09 09 09 | 09 28 73 70 6f 6f 6c 6f | &&.X...|.(spoolo|
|00001dd0| 6b 20 3d 20 63 68 65 63 | 6b 73 70 6f 6f 6c 28 29 |k = chec|kspool()|
|00001de0| 29 29 0a 58 09 09 09 09 | 64 6f 69 74 28 63 75 72 |)).X....|doit(cur|
|00001df0| 70 74 72 2d 3e 66 6c 64 | 73 5b 4e 41 4d 45 5d 29 |ptr->fld|s[NAME])|
|00001e00| 3b 0a 58 09 09 7d 0a 58 | 09 7d 0a 58 09 77 68 69 |;.X..}.X|.}.X.whi|
|00001e10| 6c 65 28 2a 61 72 67 76 | 20 26 26 20 73 70 6f 6f |le(*argv| && spoo|
|00001e20| 6c 6f 6b 29 20 7b 0a 58 | 09 09 69 66 20 28 63 68 |lok) {.X|..if (ch|
|00001e30| 6b 62 61 74 63 68 28 2a | 61 72 67 76 2c 20 22 22 |kbatch(*|argv, ""|
|00001e40| 29 20 7c 7c 20 63 68 6b | 62 61 74 63 68 28 2a 61 |) || chk|batch(*a|
|00001e50| 72 67 76 2c 20 22 2e 77 | 6f 72 6b 22 29 29 20 7b |rgv, ".w|ork")) {|
|00001e60| 0a 58 09 09 09 64 6f 69 | 74 28 2a 61 72 67 76 29 |.X...doi|t(*argv)|
|00001e70| 3b 0a 58 09 09 7d 0a 58 | 09 09 61 72 67 76 2b 2b |;.X..}.X|..argv++|
|00001e80| 3b 0a 58 09 7d 0a 58 09 | 65 78 69 74 28 30 29 3b |;.X.}.X.|exit(0);|
|00001e90| 0a 58 0a 58 7d 0a 58 0a | 58 2f 2a 0a 58 20 2a 09 |.X.X}.X.|X/*.X *.|
|00001ea0| 72 65 61 64 63 74 72 6c | 3a 0a 58 20 2a 0a 58 20 |readctrl|:.X *.X |
|00001eb0| 2a 09 45 61 63 68 20 6c | 69 6e 65 20 69 6e 20 74 |*.Each l|ine in t|
|00001ec0| 68 65 20 62 61 74 63 68 | 2e 63 74 72 6c 20 66 69 |he batch|.ctrl fi|
|00001ed0| 6c 65 20 63 6f 6e 74 61 | 69 6e 73 20 4e 55 4d 46 |le conta|ins NUMF|
|00001ee0| 4c 44 53 20 63 6f 6c 6f | 6e 2d 73 65 70 61 72 61 |LDS colo|n-separa|
|00001ef0| 74 65 64 0a 58 20 2a 09 | 70 61 72 61 6d 65 74 65 |ted.X *.|paramete|
|00001f00| 72 73 2e 20 20 54 68 69 | 73 20 66 75 6e 63 74 69 |rs. Thi|s functi|
|00001f10| 6f 6e 20 72 65 61 64 73 | 20 65 61 63 68 20 6c 69 |on reads| each li|
|00001f20| 6e 65 2c 20 61 6e 64 20 | 63 61 6c 6c 73 20 67 65 |ne, and |calls ge|
|00001f30| 74 66 6c 64 73 0a 58 20 | 2a 09 74 6f 20 73 65 70 |tflds.X |*.to sep|
|00001f40| 61 72 61 74 65 20 6f 75 | 74 20 74 68 65 20 70 61 |arate ou|t the pa|
|00001f50| 72 61 6d 65 74 65 72 73 | 2e 20 20 49 66 20 67 65 |rameters|. If ge|
|00001f60| 74 66 6c 64 73 20 72 65 | 74 75 72 6e 73 20 61 20 |tflds re|turns a |
|00001f70| 73 79 73 74 65 6d 20 64 | 65 73 63 72 69 70 74 6f |system d|escripto|
|00001f80| 72 0a 58 20 2a 09 69 74 | 20 69 73 20 6c 69 6e 6b |r.X *.it| is link|
|00001f90| 65 64 20 69 6e 74 6f 20 | 74 68 65 20 6c 69 73 74 |ed into |the list|
|00001fa0| 20 6f 66 20 73 79 73 74 | 65 6d 20 64 65 73 63 72 | of syst|em descr|
|00001fb0| 69 70 74 6f 72 73 2e 0a | 58 20 2a 2f 0a 58 0a 58 |iptors..|X */.X.X|
|00001fc0| 72 65 61 64 63 74 72 6c | 28 29 20 7b 0a 58 09 63 |readctrl|() {.X.c|
|00001fd0| 68 61 72 09 62 75 66 5b | 42 55 46 53 49 5a 5d 3b |har.buf[|BUFSIZ];|
|00001fe0| 0a 58 09 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |.X.regis|ter char|
|00001ff0| 09 2a 70 3b 0a 58 09 72 | 65 67 69 73 74 65 72 20 |.*p;.X.r|egister |
|00002000| 73 74 72 75 63 74 20 64 | 65 73 63 20 2a 70 74 72 |struct d|esc *ptr|
|00002010| 3b 0a 58 09 73 74 72 75 | 63 74 20 64 65 73 63 20 |;.X.stru|ct desc |
|00002020| 2a 67 65 74 66 6c 64 73 | 28 29 3b 0a 58 09 72 65 |*getflds|();.X.re|
|00002030| 67 69 73 74 65 72 20 46 | 49 4c 45 09 2a 63 74 72 |gister F|ILE.*ctr|
|00002040| 6c 20 3d 20 66 6f 70 65 | 6e 28 42 41 54 43 48 43 |l = fope|n(BATCHC|
|00002050| 54 52 4c 2c 20 22 72 22 | 29 3b 0a 58 09 69 66 20 |TRL, "r"|);.X.if |
|00002060| 28 21 63 74 72 6c 29 20 | 7b 0a 58 09 09 66 70 72 |(!ctrl) |{.X..fpr|
|00002070| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 62 61 |intf(std|err, "ba|
|00002080| 74 63 68 65 72 3a 20 63 | 6f 75 6c 64 20 6e 6f 74 |tcher: c|ould not|
|00002090| 20 6f 70 65 6e 20 25 73 | 20 66 69 6c 65 5c 6e 22 | open %s| file\n"|
|000020a0| 2c 0a 58 09 09 20 20 20 | 20 42 41 54 43 48 43 54 |,.X.. | BATCHCT|
|000020b0| 52 4c 29 3b 0a 58 09 09 | 65 78 69 74 28 31 29 3b |RL);.X..|exit(1);|
|000020c0| 0a 58 09 7d 0a 58 09 77 | 68 69 6c 65 20 28 66 67 |.X.}.X.w|hile (fg|
|000020d0| 65 74 73 28 62 75 66 2c | 20 73 69 7a 65 6f 66 28 |ets(buf,| sizeof(|
|000020e0| 62 75 66 29 2c 20 63 74 | 72 6c 29 29 20 7b 0a 58 |buf), ct|rl)) {.X|
|000020f0| 09 09 69 66 20 28 62 75 | 66 5b 30 5d 20 3d 3d 20 |..if (bu|f[0] == |
|00002100| 27 23 27 29 0a 58 09 09 | 09 63 6f 6e 74 69 6e 75 |'#').X..|.continu|
|00002110| 65 3b 0a 58 09 09 70 20 | 3d 20 62 75 66 20 2b 20 |e;.X..p |= buf + |
|00002120| 73 74 72 6c 65 6e 28 62 | 75 66 29 20 2d 20 31 3b |strlen(b|uf) - 1;|
|00002130| 0a 58 09 09 69 66 20 28 | 2a 70 20 3d 3d 20 27 5c |.X..if (|*p == '\|
|00002140| 6e 27 29 0a 58 09 09 09 | 2a 70 20 3d 20 27 5c 30 |n').X...|*p = '\0|
|00002150| 27 3b 0a 58 09 09 69 66 | 20 28 28 70 74 72 20 3d |';.X..if| ((ptr =|
|00002160| 20 67 65 74 66 6c 64 73 | 28 62 75 66 29 29 20 26 | getflds|(buf)) &|
|00002170| 26 20 70 72 6f 63 65 73 | 73 63 74 72 6c 28 70 74 |& proces|sctrl(pt|
|00002180| 72 29 29 20 7b 0a 58 09 | 09 09 69 66 20 28 21 68 |r)) {.X.|..if (!h|
|00002190| 65 61 64 29 0a 58 09 09 | 09 09 68 65 61 64 20 3d |ead).X..|..head =|
|000021a0| 20 64 70 74 72 20 3d 20 | 70 74 72 3b 0a 58 09 09 | dptr = |ptr;.X..|
|000021b0| 09 65 6c 73 65 20 7b 0a | 58 09 09 09 09 64 70 74 |.else {.|X....dpt|
|000021c0| 72 2d 3e 6e 65 78 74 20 | 3d 20 70 74 72 3b 0a 58 |r->next |= ptr;.X|
|000021d0| 09 09 09 09 64 70 74 72 | 20 3d 20 70 74 72 3b 0a |....dptr| = ptr;.|
|000021e0| 58 09 09 09 7d 0a 58 09 | 09 09 70 74 72 2d 3e 6e |X...}.X.|..ptr->n|
|000021f0| 65 78 74 20 3d 20 28 73 | 74 72 75 63 74 20 64 65 |ext = (s|truct de|
|00002200| 73 63 20 2a 29 20 4e 55 | 4c 4c 3b 0a 58 09 09 7d |sc *) NU|LL;.X..}|
|00002210| 0a 58 09 7d 0a 58 09 66 | 63 6c 6f 73 65 28 63 74 |.X.}.X.f|close(ct|
|00002220| 72 6c 29 3b 0a 58 7d 0a | 58 0a 58 2f 2a 0a 58 20 |rl);.X}.|X.X/*.X |
|00002230| 2a 09 64 75 6d 70 63 74 | 72 6c 3a 0a 58 20 2a 0a |*.dumpct|rl:.X *.|
|00002240| 58 20 2a 09 49 66 20 76 | 65 72 62 6f 73 65 20 69 |X *.If v|erbose i|
|00002250| 73 20 6f 6e 2c 20 64 75 | 6d 70 20 74 68 65 20 74 |s on, du|mp the t|
|00002260| 61 62 6c 65 73 0a 58 20 | 2a 2f 0a 58 0a 58 64 75 |ables.X |*/.X.Xdu|
|00002270| 6d 70 63 74 72 6c 28 29 | 20 7b 0a 58 09 72 65 67 |mpctrl()| {.X.reg|
|00002280| 69 73 74 65 72 20 73 74 | 72 75 63 74 20 64 65 73 |ister st|ruct des|
|00002290| 63 20 2a 70 3b 0a 58 09 | 72 65 67 69 73 74 65 72 |c *p;.X.|register|
|000022a0| 20 69 6e 74 20 69 3b 0a | 58 09 66 6f 72 20 28 70 | int i;.|X.for (p|
|000022b0| 20 3d 20 68 65 61 64 3b | 20 70 3b 20 70 20 3d 20 | = head;| p; p = |
|000022c0| 70 2d 3e 6e 65 78 74 29 | 20 7b 0a 58 09 09 66 6f |p->next)| {.X..fo|
|000022d0| 72 20 28 69 20 3d 20 30 | 3b 20 69 20 3c 20 4e 55 |r (i = 0|; i < NU|
|000022e0| 4d 46 4c 44 53 3b 20 69 | 2b 2b 29 0a 58 09 09 09 |MFLDS; i|++).X...|
|000022f0| 70 72 69 6e 74 66 28 22 | 25 2d 2a 73 22 2c 20 66 |printf("|%-*s", f|
|00002300| 6c 64 6c 65 6e 5b 69 5d | 2c 20 70 2d 3e 66 6c 64 |ldlen[i]|, p->fld|
|00002310| 73 5b 69 5d 29 3b 0a 58 | 09 09 70 72 69 6e 74 66 |s[i]);.X|..printf|
|00002320| 28 22 5c 6e 22 29 3b 0a | 58 09 7d 0a 58 7d 0a 58 |("\n");.|X.}.X}.X|
|00002330| 0a 58 63 68 61 72 20 2a | 73 74 72 73 61 76 65 28 |.Xchar *|strsave(|
|00002340| 29 3b 0a 58 0a 58 2f 2a | 0a 58 20 2a 09 67 65 74 |);.X.X/*|.X *.get|
|00002350| 66 6c 64 73 3a 0a 58 20 | 2a 0a 58 20 2a 09 54 68 |flds:.X |*.X *.Th|
|00002360| 69 73 20 72 6f 75 74 69 | 6e 65 20 70 61 72 73 65 |is routi|ne parse|
|00002370| 73 20 61 20 73 69 6e 67 | 6c 65 20 6c 69 6e 65 20 |s a sing|le line |
|00002380| 66 72 6f 6d 20 74 68 65 | 20 62 61 74 63 68 2e 63 |from the| batch.c|
|00002390| 74 72 6c 20 66 69 6c 65 | 2c 0a 58 20 2a 09 61 6e |trl file|,.X *.an|
|000023a0| 64 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 6c |d if suc|cessfull|
|000023b0| 79 20 70 61 72 73 65 64 | 20 61 6e 64 20 63 68 65 |y parsed| and che|
|000023c0| 63 6b 65 64 20 6f 75 74 | 2c 20 72 65 74 75 72 6e |cked out|, return|
|000023d0| 73 20 61 20 73 79 73 74 | 65 6d 0a 58 20 2a 09 64 |s a syst|em.X *.d|
|000023e0| 65 73 63 72 69 70 74 6f | 72 20 70 6f 69 6e 74 65 |escripto|r pointe|
|000023f0| 72 0a 58 20 2a 2f 0a 58 | 0a 58 73 74 72 75 63 74 |r.X */.X|.Xstruct|
|00002400| 20 64 65 73 63 20 2a 0a | 58 67 65 74 66 6c 64 73 | desc *.|Xgetflds|
|00002410| 28 62 75 66 29 0a 58 63 | 68 61 72 09 2a 62 75 66 |(buf).Xc|har.*buf|
|00002420| 3b 20 7b 0a 58 09 72 65 | 67 69 73 74 65 72 20 69 |; {.X.re|gister i|
|00002430| 6e 74 20 63 6e 74 3b 0a | 58 09 63 68 61 72 20 62 |nt cnt;.|X.char b|
|00002440| 32 5b 31 30 30 5d 3b 0a | 58 09 63 68 61 72 20 2a |2[100];.|X.char *|
|00002450| 63 75 72 70 2c 20 2a 70 | 3b 0a 58 09 69 6e 74 09 |curp, *p|;.X.int.|
|00002460| 6c 65 6e 3b 0a 58 09 73 | 74 72 75 63 74 20 64 65 |len;.X.s|truct de|
|00002470| 73 63 20 2a 64 70 74 72 | 3b 0a 58 09 64 70 74 72 |sc *dptr|;.X.dptr|
|00002480| 20 3d 20 28 73 74 72 75 | 63 74 20 64 65 73 63 20 | = (stru|ct desc |
|00002490| 2a 29 20 6d 61 6c 6c 6f | 63 28 73 69 7a 65 6f 66 |*) mallo|c(sizeof|
|000024a0| 20 28 73 74 72 75 63 74 | 20 64 65 73 63 29 29 3b | (struct| desc));|
|000024b0| 0a 58 09 69 66 20 28 21 | 64 70 74 72 29 20 7b 0a |.X.if (!|dptr) {.|
|000024c0| 58 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |X..fprin|tf(stder|
|000024d0| 72 2c 20 22 62 61 74 63 | 68 65 72 3a 20 43 61 6e |r, "batc|her: Can|
|000024e0| 6e 6f 74 20 6d 61 6c 6c | 6f 63 5c 6e 22 29 3b 0a |not mall|oc\n");.|
|000024f0| 58 09 09 65 78 69 74 28 | 31 29 3b 0a 58 09 7d 0a |X..exit(|1);.X.}.|
|00002500| 58 09 63 75 72 70 20 3d | 20 62 75 66 3b 0a 58 09 |X.curp =| buf;.X.|
|00002510| 66 6f 72 20 28 63 6e 74 | 20 3d 20 30 3b 20 63 6e |for (cnt| = 0; cn|
|00002520| 74 20 3c 20 4e 55 4d 46 | 4c 44 53 3b 20 63 6e 74 |t < NUMF|LDS; cnt|
|00002530| 2b 2b 29 20 7b 0a 58 09 | 09 69 66 20 28 63 6e 74 |++) {.X.|.if (cnt|
|00002540| 20 3d 3d 20 28 4e 55 4d | 46 4c 44 53 20 2d 20 31 | == (NUM|FLDS - 1|
|00002550| 29 29 20 7b 0a 58 09 09 | 09 69 66 20 28 73 74 72 |)) {.X..|.if (str|
|00002560| 63 68 72 28 63 75 72 70 | 2c 20 27 3a 27 29 29 20 |chr(curp|, ':')) |
|00002570| 7b 0a 58 09 09 09 09 66 | 70 72 69 6e 74 66 28 73 |{.X....f|printf(s|
|00002580| 74 64 65 72 72 2c 20 22 | 62 61 74 63 68 65 72 3a |tderr, "|batcher:|
|00002590| 20 74 6f 6f 20 6d 61 6e | 79 20 63 6f 6c 6f 6e 73 | too man|y colons|
|000025a0| 3a 20 25 73 5c 6e 22 2c | 0a 58 09 09 09 09 09 62 |: %s\n",|.X.....b|
|000025b0| 75 66 29 3b 0a 58 09 09 | 09 09 66 72 65 65 28 64 |uf);.X..|..free(d|
|000025c0| 70 74 72 29 3b 0a 58 09 | 09 09 09 72 65 74 75 72 |ptr);.X.|...retur|
|000025d0| 6e 28 4e 55 4c 4c 29 3b | 0a 58 09 09 09 7d 0a 58 |n(NULL);|.X...}.X|
|000025e0| 09 09 09 70 20 3d 20 63 | 75 72 70 20 2b 20 73 74 |...p = c|urp + st|
|000025f0| 72 6c 65 6e 28 63 75 72 | 70 29 3b 0a 58 09 09 7d |rlen(cur|p);.X..}|
|00002600| 20 65 6c 73 65 0a 58 09 | 09 09 70 20 3d 20 73 74 | else.X.|..p = st|
|00002610| 72 63 68 72 28 63 75 72 | 70 2c 20 27 3a 27 29 3b |rchr(cur|p, ':');|
|00002620| 0a 58 09 09 69 66 20 28 | 70 20 3d 3d 20 4e 55 4c |.X..if (|p == NUL|
|00002630| 4c 29 20 7b 0a 58 09 09 | 09 66 70 72 69 6e 74 66 |L) {.X..|.fprintf|
|00002640| 28 73 74 64 65 72 72 2c | 20 22 62 61 74 63 68 65 |(stderr,| "batche|
|00002650| 72 3a 20 69 6e 76 61 6c | 69 64 20 66 6f 72 6d 61 |r: inval|id forma|
|00002660| 74 20 28 25 64 29 3a 20 | 25 73 5c 6e 22 2c 20 0a |t (%d): |%s\n", .|
|00002670| 58 09 09 09 09 63 6e 74 | 2c 20 62 75 66 29 3b 0a |X....cnt|, buf);.|
|00002680| 58 09 09 09 66 72 65 65 | 28 64 70 74 72 29 3b 0a |X...free|(dptr);.|
|00002690| 58 09 09 09 72 65 74 75 | 72 6e 28 4e 55 4c 4c 29 |X...retu|rn(NULL)|
|000026a0| 3b 0a 58 09 09 7d 0a 58 | 09 09 6c 65 6e 20 3d 20 |;.X..}.X|..len = |
|000026b0| 70 20 2d 20 63 75 72 70 | 3b 0a 58 09 09 69 66 20 |p - curp|;.X..if |
|000026c0| 28 6c 65 6e 20 3e 3d 20 | 66 6c 64 6c 65 6e 5b 63 |(len >= |fldlen[c|
|000026d0| 6e 74 5d 29 20 7b 0a 58 | 09 09 09 66 70 72 69 6e |nt]) {.X|...fprin|
|000026e0| 74 66 28 73 74 64 65 72 | 72 2c 20 22 62 61 74 63 |tf(stder|r, "batc|
|000026f0| 68 65 72 3a 20 66 69 65 | 6c 64 20 25 64 20 74 6f |her: fie|ld %d to|
|00002700| 6f 20 6c 6f 6e 67 3a 20 | 25 73 5c 6e 22 2c 0a 58 |o long: |%s\n",.X|
|00002710| 09 09 09 09 63 6e 74 2b | 31 2c 20 62 75 66 29 3b |....cnt+|1, buf);|
|00002720| 0a 58 09 09 09 66 72 65 | 65 28 64 70 74 72 29 3b |.X...fre|e(dptr);|
|00002730| 0a 58 09 09 09 72 65 74 | 75 72 6e 28 4e 55 4c 4c |.X...ret|urn(NULL|
|00002740| 29 3b 0a 58 09 09 7d 0a | 58 09 09 69 66 20 28 21 |);.X..}.|X..if (!|
|00002750| 28 64 70 74 72 2d 3e 66 | 6c 64 73 5b 63 6e 74 5d |(dptr->f|lds[cnt]|
|00002760| 20 3d 20 6d 61 6c 6c 6f | 63 28 6c 65 6e 20 2b 20 | = mallo|c(len + |
|00002770| 31 29 29 29 20 7b 0a 58 | 09 09 09 66 70 72 69 6e |1))) {.X|...fprin|
|00002780| 74 66 28 73 74 64 65 72 | 72 2c 20 22 62 61 74 63 |tf(stder|r, "batc|
|00002790| 68 65 72 3a 20 63 61 6e | 6e 6f 74 20 6d 61 6c 6c |her: can|not mall|
|000027a0| 6f 63 5c 6e 22 29 3b 0a | 58 09 09 09 65 78 69 74 |oc\n");.|X...exit|
|000027b0| 28 31 29 3b 0a 58 09 09 | 7d 0a 58 09 09 73 74 72 |(1);.X..|}.X..str|
|000027c0| 6e 63 70 79 28 64 70 74 | 72 2d 3e 66 6c 64 73 5b |ncpy(dpt|r->flds[|
|000027d0| 63 6e 74 5d 2c 20 63 75 | 72 70 2c 20 6c 65 6e 29 |cnt], cu|rp, len)|
|000027e0| 3b 0a 58 09 09 64 70 74 | 72 2d 3e 66 6c 64 73 5b |;.X..dpt|r->flds[|
|000027f0| 63 6e 74 5d 5b 6c 65 6e | 5d 20 3d 20 27 5c 30 27 |cnt][len|] = '\0'|
|00002800| 3b 0a 58 09 09 63 75 72 | 70 20 3d 20 70 20 2b 20 |;.X..cur|p = p + |
|00002810| 31 3b 0a 58 09 7d 0a 58 | 09 72 65 74 75 72 6e 28 |1;.X.}.X|.return(|
|00002820| 64 70 74 72 29 3b 0a 58 | 7d 0a 58 0a 58 2f 2a 0a |dptr);.X|}.X.X/*.|
|00002830| 58 20 2a 09 73 74 72 73 | 61 76 65 3a 0a 58 20 2a |X *.strs|ave:.X *|
|00002840| 09 72 65 74 75 72 6e 73 | 20 70 6f 69 6e 74 65 72 |.returns| pointer|
|00002850| 20 74 6f 20 6d 61 6c 6c | 6f 63 27 64 20 63 6f 70 | to mall|oc'd cop|
|00002860| 79 20 6f 66 20 61 72 67 | 75 6d 65 6e 74 0a 58 20 |y of arg|ument.X |
|00002870| 2a 2f 0a 58 63 68 61 72 | 20 2a 0a 58 73 74 72 73 |*/.Xchar| *.Xstrs|
|00002880| 61 76 65 28 73 29 0a 58 | 63 68 61 72 09 2a 73 3b |ave(s).X|char.*s;|
|00002890| 20 7b 0a 58 09 72 65 67 | 69 73 74 65 72 20 63 68 | {.X.reg|ister ch|
|000028a0| 61 72 20 2a 70 20 3d 20 | 6d 61 6c 6c 6f 63 28 73 |ar *p = |malloc(s|
|000028b0| 74 72 6c 65 6e 28 73 29 | 20 2b 20 31 29 3b 0a 58 |trlen(s)| + 1);.X|
|000028c0| 09 69 66 20 28 21 70 29 | 20 7b 0a 58 09 09 66 70 |.if (!p)| {.X..fp|
|000028d0| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 20 22 62 |rintf(st|derr, "b|
|000028e0| 61 74 63 68 65 72 3a 20 | 63 61 6e 6e 6f 74 20 6d |atcher: |cannot m|
|000028f0| 61 6c 6c 6f 63 5c 6e 22 | 29 3b 0a 58 09 09 65 78 |alloc\n"|);.X..ex|
|00002900| 69 74 28 31 29 3b 0a 58 | 09 7d 0a 58 09 73 74 72 |it(1);.X|.}.X.str|
|00002910| 63 70 79 28 70 2c 20 73 | 29 3b 0a 58 09 72 65 74 |cpy(p, s|);.X.ret|
|00002920| 75 72 6e 28 70 29 3b 0a | 58 7d 0a 58 0a 58 2f 2a |urn(p);.|X}.X.X/*|
|00002930| 0a 58 20 2a 09 63 68 6b | 62 61 74 63 68 3a 0a 58 |.X *.chk|batch:.X|
|00002940| 20 2a 0a 58 20 2a 09 72 | 65 74 75 72 6e 20 31 20 | *.X *.r|eturn 1 |
|00002950| 69 66 20 61 20 62 61 74 | 63 68 65 72 20 77 6f 72 |if a bat|cher wor|
|00002960| 6b 20 66 69 6c 65 20 3c | 62 61 74 63 68 64 69 72 |k file <|batchdir|
|00002970| 3e 2f 3c 6e 61 6d 65 3e | 3c 74 79 70 65 3e 20 65 |>/<name>|<type> e|
|00002980| 78 69 73 74 73 2e 0a 58 | 20 2a 2f 0a 58 0a 58 63 |xists..X| */.X.Xc|
|00002990| 68 6b 62 61 74 63 68 28 | 6e 61 6d 65 2c 20 74 79 |hkbatch(|name, ty|
|000029a0| 70 65 29 0a 58 63 68 61 | 72 09 2a 6e 61 6d 65 3b |pe).Xcha|r.*name;|
|000029b0| 0a 58 63 68 61 72 09 2a | 74 79 70 65 3b 20 7b 0a |.Xchar.*|type; {.|
|000029c0| 58 09 63 68 61 72 20 62 | 61 74 63 68 5b 42 55 46 |X.char b|atch[BUF|
|000029d0| 53 49 5a 5d 3b 0a 58 09 | 73 70 72 69 6e 74 66 28 |SIZ];.X.|sprintf(|
|000029e0| 62 61 74 63 68 2c 20 22 | 25 73 2f 25 73 25 73 22 |batch, "|%s/%s%s"|
|000029f0| 2c 20 42 41 54 43 48 2c | 20 6e 61 6d 65 2c 20 74 |, BATCH,| name, t|
|00002a00| 79 70 65 29 3b 0a 58 09 | 69 66 20 28 61 63 63 65 |ype);.X.|if (acce|
|00002a10| 73 73 28 62 61 74 63 68 | 2c 20 30 34 29 20 3d 3d |ss(batch|, 04) ==|
|00002a20| 20 30 29 0a 58 09 09 72 | 65 74 75 72 6e 28 31 29 | 0).X..r|eturn(1)|
|00002a30| 3b 0a 58 09 65 6c 73 65 | 0a 58 09 09 72 65 74 75 |;.X.else|.X..retu|
|00002a40| 72 6e 28 30 29 3b 0a 58 | 7d 0a 58 0a 58 2f 2a 0a |rn(0);.X|}.X.X/*.|
|00002a50| 58 20 2a 09 64 6f 69 74 | 3a 0a 58 20 2a 0a 58 20 |X *.doit|:.X *.X |
|00002a60| 2a 09 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 69 |*.This r|outine i|
|00002a70| 73 20 63 61 6c 6c 65 64 | 20 77 69 74 68 20 74 68 |s called| with th|
|00002a80| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 73 79 |e name o|f the sy|
|00002a90| 73 74 65 6d 20 74 68 61 | 74 20 68 61 73 0a 58 20 |stem tha|t has.X |
|00002aa0| 2a 09 62 65 65 6e 20 64 | 65 74 65 72 6d 69 6e 65 |*.been d|etermine|
|00002ab0| 64 20 74 6f 20 68 61 76 | 65 20 77 6f 72 6b 20 66 |d to hav|e work f|
|00002ac0| 6f 72 20 69 74 2e 20 20 | 54 68 65 20 73 79 73 74 |or it. |The syst|
|00002ad0| 65 6d 20 69 73 20 73 65 | 61 72 63 68 65 64 0a 58 |em is se|arched.X|
|00002ae0| 20 2a 09 66 6f 72 20 69 | 6e 20 74 68 65 20 73 79 | *.for i|n the sy|
|00002af0| 73 74 65 6d 20 64 65 73 | 63 72 69 70 74 6f 72 73 |stem des|criptors|
|00002b00| 2e 20 20 49 66 20 66 6f | 75 6e 64 2c 20 61 20 22 |. If fo|und, a "|
|00002b10| 73 79 73 74 65 6d 22 20 | 6c 69 6e 65 0a 58 20 2a |system" |line.X *|
|00002b20| 09 69 73 20 63 6f 6e 74 | 72 75 63 74 65 64 20 66 |.is cont|ructed f|
|00002b30| 72 6f 6d 20 74 68 65 20 | 74 61 62 6c 65 73 2c 20 |rom the |tables, |
|00002b40| 61 6e 64 20 65 78 65 63 | 75 74 65 64 20 69 66 20 |and exec|uted if |
|00002b50| 73 79 73 74 65 6d 20 68 | 61 73 20 6e 6f 74 0a 58 |system h|as not.X|
|00002b60| 20 2a 09 65 78 63 65 65 | 64 65 64 20 69 74 27 73 | *.excee|ded it's|
|00002b70| 20 55 55 43 50 20 71 75 | 65 75 65 20 6c 69 6d 69 | UUCP qu|eue limi|
|00002b80| 74 2e 0a 58 20 2a 2f 0a | 58 0a 58 64 6f 69 74 28 |t..X */.|X.Xdoit(|
|00002b90| 6e 61 6d 65 29 0a 58 63 | 68 61 72 09 2a 6e 61 6d |name).Xc|har.*nam|
|00002ba0| 65 3b 20 7b 0a 58 09 63 | 68 61 72 09 63 6d 64 62 |e; {.X.c|har.cmdb|
|00002bb0| 75 66 5b 42 55 46 53 49 | 5a 5d 3b 0a 58 09 69 6e |uf[BUFSI|Z];.X.in|
|00002bc0| 74 09 72 63 3b 0a 58 09 | 6c 6f 6e 67 09 71 75 65 |t.rc;.X.|long.que|
|00002bd0| 75 65 73 69 7a 65 3b 0a | 58 09 6c 6f 6e 67 09 63 |uesize;.|X.long.c|
|00002be0| 68 65 63 6b 71 75 65 75 | 65 28 29 2c 20 63 68 65 |heckqueu|e(), che|
|00002bf0| 63 6b 73 70 6f 6f 6c 28 | 29 3b 0a 58 09 6c 6f 6e |ckspool(|);.X.lon|
|00002c00| 67 09 71 75 65 75 65 6d | 61 78 3b 0a 58 09 72 65 |g.queuem|ax;.X.re|
|00002c10| 67 69 73 74 65 72 20 73 | 74 72 75 63 74 20 64 65 |gister s|truct de|
|00002c20| 73 63 20 2a 70 74 72 3b | 0a 58 09 69 66 20 28 76 |sc *ptr;|.X.if (v|
|00002c30| 65 72 62 6f 73 65 29 0a | 58 09 09 70 72 69 6e 74 |erbose).|X..print|
|00002c40| 66 28 22 62 61 74 63 68 | 65 72 3a 20 64 6f 69 6e |f("batch|er: doin|
|00002c50| 67 20 25 73 5c 6e 22 2c | 20 6e 61 6d 65 29 3b 0a |g %s\n",| name);.|
|00002c60| 58 09 66 6f 72 20 28 70 | 74 72 20 3d 20 68 65 61 |X.for (p|tr = hea|
|00002c70| 64 3b 20 70 74 72 3b 20 | 70 74 72 20 3d 20 70 74 |d; ptr; |ptr = pt|
|00002c80| 72 2d 3e 6e 65 78 74 29 | 0a 58 09 09 69 66 20 28 |r->next)|.X..if (|
|00002c90| 21 73 74 72 63 6d 70 28 | 70 74 72 2d 3e 66 6c 64 |!strcmp(|ptr->fld|
|00002ca0| 73 5b 4e 41 4d 45 5d 2c | 20 6e 61 6d 65 29 29 20 |s[NAME],| name)) |
|00002cb0| 7b 0a 58 09 09 09 2f 2a | 09 66 6f 72 6d 20 74 68 |{.X.../*|.form th|
|00002cc0| 65 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 66 |e comman|d line f|
|00002cd0| 6f 72 20 62 61 74 63 68 | 69 6e 67 09 2a 2f 0a 58 |or batch|ing.*/.X|
|00002ce0| 09 09 09 73 70 72 69 6e | 74 66 28 63 6d 64 62 75 |...sprin|tf(cmdbu|
|00002cf0| 66 2c 20 22 25 73 20 25 | 73 2f 25 73 20 25 73 22 |f, "%s %|s/%s %s"|
|00002d00| 2c 0a 58 09 09 09 09 53 | 42 41 54 43 48 2c 20 42 |,.X....S|BATCH, B|
|00002d10| 41 54 43 48 2c 20 6e 61 | 6d 65 2c 20 70 74 72 2d |ATCH, na|me, ptr-|
|00002d20| 3e 66 6c 64 73 5b 53 49 | 5a 45 5d 29 3b 0a 58 09 |>flds[SI|ZE]);.X.|
|00002d30| 09 09 69 66 20 28 2a 28 | 70 74 72 2d 3e 66 6c 64 |..if (*(|ptr->fld|
|00002d40| 73 5b 43 4f 4d 50 52 45 | 53 53 5d 29 29 0a 58 09 |s[COMPRE|SS])).X.|
|00002d50| 09 09 09 73 70 72 69 6e | 74 66 28 63 6d 64 62 75 |...sprin|tf(cmdbu|
|00002d60| 66 20 2b 20 73 74 72 6c | 65 6e 28 63 6d 64 62 75 |f + strl|en(cmdbu|
|00002d70| 66 29 2c 20 22 7c 25 73 | 22 2c 0a 58 09 09 09 09 |f), "|%s|",.X....|
|00002d80| 09 70 74 72 2d 3e 66 6c | 64 73 5b 43 4f 4d 50 52 |.ptr->fl|ds[COMPR|
|00002d90| 45 53 53 5d 29 3b 0a 58 | 09 09 09 2f 2a 09 46 69 |ESS]);.X|.../*.Fi|
|00002da0| 6e 64 20 74 68 65 20 71 | 75 65 75 65 20 6c 69 6d |nd the q|ueue lim|
|00002db0| 69 74 09 2a 2f 0a 58 09 | 09 09 73 70 72 69 6e 74 |it.*/.X.|..sprint|
|00002dc0| 66 28 63 6d 64 62 75 66 | 20 2b 20 73 74 72 6c 65 |f(cmdbuf| + strle|
|00002dd0| 6e 28 63 6d 64 62 75 66 | 29 2c 20 22 7c 25 73 22 |n(cmdbuf|), "|%s"|
|00002de0| 2c 20 70 74 72 2d 3e 66 | 6c 64 73 5b 55 55 58 5d |, ptr->f|lds[UUX]|
|00002df0| 29 3b 0a 58 09 09 09 69 | 66 20 28 31 20 21 3d 20 |);.X...i|f (1 != |
|00002e00| 73 73 63 61 6e 66 28 70 | 74 72 2d 3e 66 6c 64 73 |sscanf(p|tr->flds|
|00002e10| 5b 51 53 49 5a 45 5d 2c | 20 22 25 6c 64 22 2c 20 |[QSIZE],| "%ld", |
|00002e20| 26 71 75 65 75 65 6d 61 | 78 29 29 20 7b 0a 58 09 |&queuema|x)) {.X.|
|00002e30| 09 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder|
|00002e40| 72 2c 20 22 62 61 74 63 | 68 65 72 3a 20 62 61 64 |r, "batc|her: bad|
|00002e50| 20 71 6d 61 78 20 66 69 | 65 6c 64 3a 20 25 73 5c | qmax fi|eld: %s\|
|00002e60| 6e 22 2c 0a 58 09 09 09 | 09 09 70 74 72 2d 3e 66 |n",.X...|..ptr->f|
|00002e70| 6c 64 73 5b 51 53 49 5a | 45 5d 29 3b 0a 58 09 09 |lds[QSIZ|E]);.X..|
|00002e80| 09 09 72 65 74 75 72 6e | 3b 0a 58 09 09 09 7d 0a |..return|;.X...}.|
|00002e90| 58 09 09 09 71 75 65 75 | 65 73 69 7a 65 20 3d 20 |X...queu|esize = |
|00002ea0| 63 68 65 63 6b 71 75 65 | 75 65 28 70 74 72 2d 3e |checkque|ue(ptr->|
|00002eb0| 66 6c 64 73 5b 4e 41 4d | 45 5d 29 3b 0a 58 09 09 |flds[NAM|E]);.X..|
|00002ec0| 09 72 63 20 3d 20 30 3b | 0a 58 09 09 09 2f 2a 09 |.rc = 0;|.X.../*.|
|00002ed0| 57 68 69 6c 65 20 77 65 | 20 68 61 76 65 6e 27 74 |While we| haven't|
|00002ee0| 20 65 78 63 65 65 64 65 | 64 20 74 68 65 20 71 75 | exceede|d the qu|
|00002ef0| 65 75 65 20 6c 69 6d 69 | 74 20 26 0a 58 09 09 09 |eue limi|t &.X...|
|00002f00| 09 74 68 65 72 65 27 73 | 20 77 6f 72 6b 20 74 6f |.there's| work to|
|00002f10| 20 64 6f 2c 20 69 73 73 | 75 65 20 74 68 65 20 63 | do, iss|ue the c|
|00002f20| 6f 6d 6d 61 6e 64 20 2a | 2f 0a 58 09 09 09 77 68 |ommand *|/.X...wh|
|00002f30| 69 6c 65 20 28 71 75 65 | 75 65 73 69 7a 65 20 3c |ile (que|uesize <|
|00002f40| 20 71 75 65 75 65 6d 61 | 78 20 26 26 20 21 72 63 | queuema|x && !rc|
|00002f50| 20 26 26 20 0a 58 09 09 | 09 09 28 63 68 6b 62 61 | && .X..|..(chkba|
|00002f60| 74 63 68 28 70 74 72 2d | 3e 66 6c 64 73 5b 4e 41 |tch(ptr-|>flds[NA|
|00002f70| 4d 45 5d 2c 20 22 22 29 | 20 7c 7c 20 0a 58 09 09 |ME], "")| || .X..|
|00002f80| 09 09 20 20 20 63 68 6b | 62 61 74 63 68 28 70 74 |.. chk|batch(pt|
|00002f90| 72 2d 3e 66 6c 64 73 5b | 4e 41 4d 45 5d 2c 20 22 |r->flds[|NAME], "|
|00002fa0| 2e 77 6f 72 6b 22 29 29 | 20 26 26 0a 58 09 09 09 |.work"))| &&.X...|
|00002fb0| 09 20 20 20 28 73 70 6f | 6f 6c 6f 6b 20 3d 20 63 |. (spo|olok = c|
|00002fc0| 68 65 63 6b 73 70 6f 6f | 6c 28 29 29 29 20 7b 0a |heckspoo|l())) {.|
|00002fd0| 58 23 69 66 64 65 66 09 | 44 45 42 55 47 0a 58 09 |X#ifdef.|DEBUG.X.|
|00002fe0| 09 09 09 70 72 69 6e 74 | 66 28 22 62 61 74 63 68 |...print|f("batch|
|00002ff0| 65 72 3a 20 63 6d 64 3a | 20 25 73 5c 6e 22 2c 20 |er: cmd:| %s\n", |
|00003000| 63 6d 64 62 75 66 29 3b | 0a 58 09 09 09 09 72 63 |cmdbuf);|.X....rc|
|00003010| 20 3d 20 31 3b 0a 58 23 | 65 6c 73 65 0a 58 09 09 | = 1;.X#|else.X..|
|00003020| 09 09 72 63 20 3d 20 73 | 79 73 74 65 6d 28 63 6d |..rc = s|ystem(cm|
|00003030| 64 62 75 66 29 3b 0a 58 | 09 09 09 09 71 75 65 75 |dbuf);.X|....queu|
|00003040| 65 73 69 7a 65 20 3d 20 | 63 68 65 63 6b 71 75 65 |esize = |checkque|
|00003050| 75 65 28 70 74 72 2d 3e | 66 6c 64 73 5b 4e 41 4d |ue(ptr->|flds[NAM|
|00003060| 45 5d 29 3b 0a 58 23 65 | 6e 64 69 66 0a 58 09 09 |E]);.X#e|ndif.X..|
|00003070| 09 7d 0a 58 09 09 09 72 | 65 74 75 72 6e 3b 0a 58 |.}.X...r|eturn;.X|
|00003080| 09 09 7d 0a 58 09 66 70 | 72 69 6e 74 66 28 73 74 |..}.X.fp|rintf(st|
|00003090| 64 65 72 72 2c 20 22 62 | 61 74 63 68 65 72 3a 20 |derr, "b|atcher: |
|000030a0| 6e 6f 20 63 6f 6e 74 72 | 6f 6c 20 6c 69 6e 65 20 |no contr|ol line |
|000030b0| 66 6f 72 20 25 73 5c 6e | 22 2c 20 6e 61 6d 65 29 |for %s\n|", name)|
|000030c0| 3b 0a 58 7d 0a 58 0a 58 | 2f 2a 0a 58 20 2a 09 70 |;.X}.X.X|/*.X *.p|
|000030d0| 72 6f 63 65 73 73 63 74 | 72 6c 3a 0a 58 20 2a 0a |rocessct|rl:.X *.|
|000030e0| 58 20 2a 09 43 68 65 63 | 6b 20 76 61 6c 69 64 69 |X *.Chec|k validi|
|000030f0| 74 79 20 6f 66 20 62 61 | 74 63 68 2e 63 74 72 6c |ty of ba|tch.ctrl|
|00003100| 20 65 6e 74 72 69 65 73 | 20 61 6e 64 20 73 75 70 | entries| and sup|
|00003110| 70 6c 79 20 64 65 66 61 | 75 6c 74 73 2e 0a 58 20 |ply defa|ults..X |
|00003120| 2a 2f 0a 58 70 72 6f 63 | 65 73 73 63 74 72 6c 28 |*/.Xproc|essctrl(|
|00003130| 70 74 72 29 0a 58 73 74 | 72 75 63 74 09 64 65 73 |ptr).Xst|ruct.des|
|00003140| 63 20 2a 70 74 72 3b 20 | 7b 0a 58 09 63 68 61 72 |c *ptr; |{.X.char|
|00003150| 09 62 75 66 5b 31 30 30 | 5d 3b 0a 58 09 72 65 67 |.buf[100|];.X.reg|
|00003160| 69 73 74 65 72 20 63 68 | 61 72 09 2a 70 2c 20 2a |ister ch|ar.*p, *|
|00003170| 75 75 78 66 6c 61 67 73 | 3b 0a 58 09 69 66 20 28 |uuxflags|;.X.if (|
|00003180| 21 70 74 72 29 20 72 65 | 74 75 72 6e 3b 0a 58 09 |!ptr) re|turn;.X.|
|00003190| 69 66 20 28 73 74 72 6c | 65 6e 28 70 74 72 2d 3e |if (strl|en(ptr->|
|000031a0| 66 6c 64 73 5b 4e 41 4d | 45 5d 29 20 3d 3d 20 30 |flds[NAM|E]) == 0|
|000031b0| 29 20 7b 0a 58 09 09 66 | 70 72 69 6e 74 66 28 73 |) {.X..f|printf(s|
|000031c0| 74 64 65 72 72 2c 20 22 | 62 61 74 63 68 65 72 3a |tderr, "|batcher:|
|000031d0| 20 6e 75 6c 6c 20 73 79 | 73 74 65 6d 20 6e 61 6d | null sy|stem nam|
|000031e0| 65 5c 6e 22 29 3b 0a 58 | 09 09 66 72 65 65 28 70 |e\n");.X|..free(p|
|000031f0| 74 72 29 3b 0a 58 09 09 | 72 65 74 75 72 6e 28 30 |tr);.X..|return(0|
|00003200| 29 3b 0a 58 09 7d 0a 58 | 0a 58 09 69 66 20 28 73 |);.X.}.X|.X.if (s|
|00003210| 74 72 6c 65 6e 28 70 74 | 72 2d 3e 66 6c 64 73 5b |trlen(pt|r->flds[|
|00003220| 51 53 49 5a 45 5d 29 20 | 3d 3d 20 30 29 20 7b 0a |QSIZE]) |== 0) {.|
|00003230| 58 09 09 66 72 65 65 28 | 70 74 72 2d 3e 66 6c 64 |X..free(|ptr->fld|
|00003240| 73 5b 51 53 49 5a 45 5d | 29 3b 0a 58 09 09 70 74 |s[QSIZE]|);.X..pt|
|00003250| 72 2d 3e 66 6c 64 73 5b | 51 53 49 5a 45 5d 20 3d |r->flds[|QSIZE] =|
|00003260| 20 73 74 72 73 61 76 65 | 28 22 35 30 30 30 30 30 | strsave|("500000|
|00003270| 22 29 3b 0a 58 09 7d 0a | 58 0a 58 09 69 66 20 28 |");.X.}.|X.X.if (|
|00003280| 73 74 72 6c 65 6e 28 70 | 74 72 2d 3e 66 6c 64 73 |strlen(p|tr->flds|
|00003290| 5b 43 4c 41 53 53 5d 29 | 20 3d 3d 20 30 29 20 7b |[CLASS])| == 0) {|
|000032a0| 0a 58 09 09 66 72 65 65 | 28 70 74 72 2d 3e 66 6c |.X..free|(ptr->fl|
|000032b0| 64 73 5b 43 4c 41 53 53 | 5d 29 3b 0a 58 09 09 70 |ds[CLASS|]);.X..p|
|000032c0| 74 72 2d 3e 66 6c 64 73 | 5b 43 4c 41 53 53 5d 20 |tr->flds|[CLASS] |
|000032d0| 3d 20 73 74 72 73 61 76 | 65 28 22 7a 22 29 3b 0a |= strsav|e("z");.|
|000032e0| 58 09 7d 0a 58 0a 58 09 | 69 66 20 28 73 74 72 6c |X.}.X.X.|if (strl|
|000032f0| 65 6e 28 70 74 72 2d 3e | 66 6c 64 73 5b 53 49 5a |en(ptr->|flds[SIZ|
|00003300| 45 5d 29 20 3d 3d 20 30 | 29 20 7b 0a 58 09 09 66 |E]) == 0|) {.X..f|
|00003310| 72 65 65 28 70 74 72 2d | 3e 66 6c 64 73 5b 53 49 |ree(ptr-|>flds[SI|
|00003320| 5a 45 5d 29 3b 0a 58 09 | 09 70 74 72 2d 3e 66 6c |ZE]);.X.|.ptr->fl|
|00003330| 64 73 5b 53 49 5a 45 5d | 20 3d 20 73 74 72 73 61 |ds[SIZE]| = strsa|
|00003340| 76 65 28 22 31 30 30 30 | 30 30 22 29 3b 0a 58 09 |ve("1000|00");.X.|
|00003350| 7d 0a 58 0a 58 09 69 66 | 20 28 73 74 72 6c 65 6e |}.X.X.if| (strlen|
|00003360| 28 70 74 72 2d 3e 66 6c | 64 73 5b 55 55 58 46 4c |(ptr->fl|ds[UUXFL|
|00003370| 41 47 53 5d 29 20 3d 3d | 20 30 29 20 7b 0a 58 09 |AGS]) ==| 0) {.X.|
|00003380| 09 66 72 65 65 28 70 74 | 72 2d 3e 66 6c 64 73 5b |.free(pt|r->flds[|
|00003390| 55 55 58 46 4c 41 47 53 | 5d 29 3b 0a 58 09 09 70 |UUXFLAGS|]);.X..p|
|000033a0| 74 72 2d 3e 66 6c 64 73 | 5b 55 55 58 46 4c 41 47 |tr->flds|[UUXFLAG|
|000033b0| 53 5d 20 3d 20 73 74 72 | 73 61 76 65 28 22 2d 72 |S] = str|save("-r|
|000033c0| 20 2d 7a 20 2d 67 64 22 | 29 3b 0a 58 09 7d 0a 58 | -z -gd"|);.X.}.X|
|000033d0| 0a 58 09 69 66 20 28 73 | 74 72 6c 65 6e 28 70 74 |.X.if (s|trlen(pt|
|000033e0| 72 2d 3e 66 6c 64 73 5b | 55 55 58 5d 29 20 3d 3d |r->flds[|UUX]) ==|
|000033f0| 20 30 29 20 7b 0a 58 09 | 09 73 70 72 69 6e 74 66 | 0) {.X.|.sprintf|
|00003400| 28 62 75 66 2c 20 22 75 | 75 78 20 2d 20 25 73 20 |(buf, "u|ux - %s |
|00003410| 25 73 21 25 73 22 2c 20 | 70 74 72 2d 3e 66 6c 64 |%s!%s", |ptr->fld|
|00003420| 73 5b 55 55 58 46 4c 41 | 47 53 5d 2c 0a 58 09 09 |s[UUXFLA|GS],.X..|
|00003430| 09 70 74 72 2d 3e 66 6c | 64 73 5b 4e 41 4d 45 5d |.ptr->fl|ds[NAME]|
|00003440| 2c 20 0a 58 09 09 09 2a | 70 74 72 2d 3e 66 6c 64 |, .X...*|ptr->fld|
|00003450| 73 5b 43 4f 4d 50 52 45 | 53 53 5d 20 3f 20 22 63 |s[COMPRE|SS] ? "c|
|00003460| 75 6e 62 61 74 63 68 22 | 20 3a 20 22 72 6e 65 77 |unbatch"| : "rnew|
|00003470| 73 22 29 3b 0a 58 09 09 | 70 74 72 2d 3e 66 6c 64 |s");.X..|ptr->fld|
|00003480| 73 5b 55 55 58 5d 20 3d | 20 73 74 72 73 61 76 65 |s[UUX] =| strsave|
|00003490| 28 62 75 66 29 3b 0a 58 | 09 7d 0a 58 09 72 65 74 |(buf);.X|.}.X.ret|
|000034a0| 75 72 6e 28 31 29 3b 0a | 58 7d 0a 58 0a 58 2f 2a |urn(1);.|X}.X.X/*|
|000034b0| 0a 58 20 2a 09 63 68 65 | 63 6b 71 75 65 75 65 3a |.X *.che|ckqueue:|
|000034c0| 0a 58 20 2a 0a 58 20 2a | 09 4c 6f 67 69 63 61 6c |.X *.X *|.Logical|
|000034d0| 6c 79 2c 20 61 6c 6c 20 | 74 68 69 73 20 63 6f 64 |ly, all |this cod|
|000034e0| 65 20 64 6f 65 73 20 69 | 73 20 72 65 74 75 72 6e |e does i|s return|
|000034f0| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 74 68 65 | the siz|e of the|
|00003500| 20 55 55 43 50 20 71 75 | 65 75 65 0a 58 20 2a 09 | UUCP qu|eue.X *.|
|00003510| 66 6f 72 20 73 79 73 74 | 65 6d 20 22 6e 61 6d 65 |for syst|em "name|
|00003520| 22 2e 0a 58 20 2a 09 49 | 27 76 65 20 74 61 6b 65 |"..X *.I|'ve take|
|00003530| 6e 20 74 68 65 20 65 61 | 73 79 20 77 61 79 20 6f |n the ea|sy way o|
|00003540| 75 74 20 61 6e 64 20 70 | 6f 70 65 6e 27 64 20 22 |ut and p|open'd "|
|00003550| 75 75 71 22 20 28 34 2e | 33 20 42 53 44 20 55 55 |uuq" (4.|3 BSD UU|
|00003560| 43 50 20 75 74 69 6c 69 | 74 79 29 0a 58 20 2a 09 |CP utili|ty).X *.|
|00003570| 74 6f 20 70 61 72 73 65 | 20 74 68 65 20 66 69 72 |to parse| the fir|
|00003580| 73 74 20 6c 69 6e 65 2c | 20 77 68 69 63 68 20 6c |st line,| which l|
|00003590| 6f 6f 6b 73 20 73 6f 6d | 65 74 68 69 6e 67 20 6c |ooks som|ething l|
|000035a0| 69 6b 65 20 74 68 69 73 | 3a 0a 58 20 2a 0a 58 20 |ike this|:.X *.X |
|000035b0| 2a 09 3c 73 79 73 74 65 | 6d 6e 61 6d 65 3e 3a 20 |*.<syste|mname>: |
|000035c0| 3c 6e 3e 20 6a 6f 62 73 | 2c 20 3c 6e 6e 6e 6e 3e |<n> jobs|, <nnnn>|
|000035d0| 20 62 79 74 65 73 2c 20 | 2e 2e 2e 2e 0a 58 20 2a | bytes, |.....X *|
|000035e0| 0a 58 20 2a 09 49 20 6d | 65 72 65 6c 79 20 6c 6f |.X *.I m|erely lo|
|000035f0| 6f 6b 20 66 6f 72 20 74 | 68 65 20 66 69 72 73 74 |ok for t|he first|
|00003600| 20 63 6f 6d 6d 61 2c 20 | 61 6e 64 20 73 73 63 61 | comma, |and ssca|
|00003610| 6e 66 20 74 68 65 20 6e | 75 6d 62 65 72 20 66 6f |nf the n|umber fo|
|00003620| 6c 6c 6f 77 69 6e 67 2e | 0a 58 20 2a 09 41 20 70 |llowing.|.X *.A p|
|00003630| 72 6f 70 65 72 20 73 6f | 6c 75 74 69 6f 6e 20 77 |roper so|lution w|
|00003640| 6f 75 6c 64 20 62 65 20 | 74 6f 20 64 69 76 65 20 |ould be |to dive |
|00003650| 69 6e 20 61 6e 64 20 70 | 61 72 73 65 20 74 68 65 |in and p|arse the|
|00003660| 20 55 55 43 50 20 71 75 | 65 75 65 73 0a 58 20 2a | UUCP qu|eues.X *|
|00003670| 09 74 68 65 6d 73 65 6c | 76 65 73 2c 20 62 75 74 |.themsel|ves, but|
|00003680| 3a 20 69 74 27 73 20 6d | 6f 64 65 72 61 74 65 6c |: it's m|oderatel|
|00003690| 79 20 64 69 66 66 69 63 | 75 6c 74 2c 20 61 6e 64 |y diffic|ult, and|
|000036a0| 20 69 74 20 63 68 61 6e | 67 65 73 20 66 72 6f 6d | it chan|ges from|
|000036b0| 20 0a 58 20 2a 09 73 79 | 73 74 65 6d 20 74 6f 20 | .X *.sy|stem to |
|000036c0| 73 79 73 74 65 6d 2e 0a | 58 20 2a 2f 0a 58 0a 58 |system..|X */.X.X|
|000036d0| 6c 6f 6e 67 0a 58 63 68 | 65 63 6b 71 75 65 75 65 |long.Xch|eckqueue|
|000036e0| 28 6e 61 6d 65 29 0a 58 | 63 68 61 72 09 2a 6e 61 |(name).X|char.*na|
|000036f0| 6d 65 3b 20 7b 0a 58 23 | 69 66 64 65 66 09 55 55 |me; {.X#|ifdef.UU|
|00003700| 51 0a 58 09 63 68 61 72 | 20 62 75 66 5b 42 55 46 |Q.X.char| buf[BUF|
|00003710| 53 49 5a 5d 3b 0a 58 09 | 6c 6f 6e 67 20 72 65 74 |SIZ];.X.|long ret|
|00003720| 76 61 6c 3b 0a 58 09 72 | 65 67 69 73 74 65 72 20 |val;.X.r|egister |
|00003730| 63 68 61 72 20 2a 70 32 | 3b 0a 58 09 46 49 4c 45 |char *p2|;.X.FILE|
|00003740| 20 2a 70 2c 20 2a 70 6f | 70 65 6e 28 29 3b 0a 58 | *p, *po|pen();.X|
|00003750| 09 2f 2a 20 47 72 6f 73 | 73 2c 20 62 75 74 20 74 |./* Gros|s, but t|
|00003760| 68 65 20 65 61 73 69 65 | 73 74 20 77 61 79 20 2a |he easie|st way *|
|00003770| 2f 0a 58 09 73 70 72 69 | 6e 74 66 28 62 75 66 2c |/.X.spri|ntf(buf,|
|00003780| 20 22 75 75 71 20 2d 6c | 20 2d 73 25 73 22 2c 20 | "uuq -l| -s%s", |
|00003790| 6e 61 6d 65 29 3b 0a 58 | 09 70 20 3d 20 70 6f 70 |name);.X|.p = pop|
|000037a0| 65 6e 28 62 75 66 2c 20 | 22 72 22 29 3b 0a 58 09 |en(buf, |"r");.X.|
|000037b0| 69 66 20 28 21 66 67 65 | 74 73 28 62 75 66 2c 20 |if (!fge|ts(buf, |
|000037c0| 73 69 7a 65 6f 66 28 62 | 75 66 29 2c 20 70 29 29 |sizeof(b|uf), p))|
|000037d0| 20 7b 0a 58 09 09 72 65 | 74 75 72 6e 28 30 29 3b | {.X..re|turn(0);|
|000037e0| 0a 58 09 7d 0a 58 09 70 | 63 6c 6f 73 65 28 70 29 |.X.}.X.p|close(p)|
|000037f0| 3b 0a 58 09 70 32 20 3d | 20 73 74 72 63 68 72 28 |;.X.p2 =| strchr(|
|00003800| 62 75 66 2c 20 27 2c 27 | 29 3b 0a 58 09 69 66 20 |buf, ','|);.X.if |
|00003810| 28 70 32 20 26 26 20 31 | 20 3d 3d 20 73 73 63 61 |(p2 && 1| == ssca|
|00003820| 6e 66 28 70 32 2b 31 2c | 20 22 25 6c 64 22 2c 20 |nf(p2+1,| "%ld", |
|00003830| 26 72 65 74 76 61 6c 29 | 29 20 7b 0a 58 09 09 72 |&retval)|) {.X..r|
|00003840| 65 74 75 72 6e 28 72 65 | 74 76 61 6c 29 3b 0a 58 |eturn(re|tval);.X|
|00003850| 09 7d 0a 58 09 66 70 72 | 69 6e 74 66 28 73 74 64 |.}.X.fpr|intf(std|
|00003860| 65 72 72 2c 20 22 62 61 | 74 63 68 65 72 3a 20 63 |err, "ba|tcher: c|
|00003870| 6f 75 6c 64 20 6e 6f 74 | 20 69 6e 74 65 72 70 72 |ould not| interpr|
|00003880| 65 74 20 25 73 5c 6e 22 | 2c 20 62 75 66 29 3b 0a |et %s\n"|, buf);.|
|00003890| 58 09 72 65 74 75 72 6e | 28 31 30 30 30 30 30 30 |X.return|(1000000|
|000038a0| 30 29 3b 0a 58 23 65 6c | 73 65 0a 58 09 72 65 74 |0);.X#el|se.X.ret|
|000038b0| 75 72 6e 28 31 30 30 30 | 30 30 30 30 29 3b 0a 58 |urn(1000|0000);.X|
|000038c0| 23 65 6e 64 69 66 0a 58 | 7d 0a 58 0a 58 2f 2a 09 |#endif.X|}.X.X/*.|
|000038d0| 54 68 69 73 20 66 75 6e | 63 74 69 6f 6e 20 72 65 |This fun|ction re|
|000038e0| 74 75 72 6e 73 20 74 68 | 65 20 61 6d 6f 75 6e 74 |turns th|e amount|
|000038f0| 20 6f 66 20 66 72 65 65 | 20 73 70 61 63 65 20 6f | of free| space o|
|00003900| 6e 20 74 68 65 20 73 70 | 6f 6f 6c 0a 58 09 64 65 |n the sp|ool.X.de|
|00003910| 76 69 63 65 2c 20 74 68 | 69 73 20 6d 61 79 20 6e |vice, th|is may n|
|00003920| 6f 74 20 77 6f 72 6b 20 | 6f 6e 20 79 6f 75 72 20 |ot work |on your |
|00003930| 73 79 73 74 65 6d 20 2d | 20 69 74 20 72 65 61 64 |system -| it read|
|00003940| 73 20 74 68 65 0a 58 09 | 73 65 63 6f 6e 64 20 6c |s the.X.|second l|
|00003950| 69 6e 65 20 66 72 6f 6d | 20 61 20 22 64 66 20 2f |ine from| a "df /|
|00003960| 75 73 72 2f 73 70 6f 6f | 6c 2f 75 75 63 70 22 20 |usr/spoo|l/uucp" |
|00003970| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 09 53 50 4f 4f |*/.X#def|ine.SPOO|
|00003980| 4c 20 22 2f 75 73 72 2f | 73 70 6f 6f 6c 2f 75 75 |L "/usr/|spool/uu|
|00003990| 63 70 22 0a 58 0a 58 63 | 68 65 63 6b 73 70 6f 6f |cp".X.Xc|heckspoo|
|000039a0| 6c 28 29 20 7b 0a 58 23 | 69 66 64 65 66 09 44 46 |l() {.X#|ifdef.DF|
|000039b0| 41 42 4c 45 0a 58 09 63 | 68 61 72 20 62 75 66 5b |ABLE.X.c|har buf[|
|000039c0| 31 30 30 5d 3b 0a 58 09 | 46 49 4c 45 20 2a 70 2c |100];.X.|FILE *p,|
|000039d0| 20 2a 70 6f 70 65 6e 28 | 29 3b 0a 58 09 6c 6f 6e | *popen(|);.X.lon|
|000039e0| 67 20 76 61 6c 3b 0a 58 | 09 73 70 72 69 6e 74 66 |g val;.X|.sprintf|
|000039f0| 28 62 75 66 2c 20 22 64 | 66 20 25 73 22 2c 20 53 |(buf, "d|f %s", S|
|00003a00| 50 4f 4f 4c 29 3b 0a 58 | 09 69 66 20 28 21 28 70 |POOL);.X|.if (!(p|
|00003a10| 20 3d 20 70 6f 70 65 6e | 28 62 75 66 2c 20 22 72 | = popen|(buf, "r|
|00003a20| 22 29 29 29 20 7b 0a 58 | 09 09 66 70 72 69 6e 74 |"))) {.X|..fprint|
|00003a30| 66 28 73 74 64 65 72 72 | 2c 20 22 62 61 74 63 68 |f(stderr|, "batch|
|00003a40| 65 72 3a 20 63 6f 75 6c | 64 6e 27 74 20 70 6f 70 |er: coul|dn't pop|
|00003a50| 65 6e 20 25 73 5c 6e 22 | 2c 20 62 75 66 29 3b 0a |en %s\n"|, buf);.|
|00003a60| 58 09 09 72 65 74 75 72 | 6e 28 30 29 3b 0a 58 09 |X..retur|n(0);.X.|
|00003a70| 7d 0a 58 09 69 66 20 28 | 21 66 67 65 74 73 28 62 |}.X.if (|!fgets(b|
|00003a80| 75 66 2c 20 73 69 7a 65 | 6f 66 28 62 75 66 29 2c |uf, size|of(buf),|
|00003a90| 20 70 29 29 20 7b 0a 58 | 09 09 66 70 72 69 6e 74 | p)) {.X|..fprint|
|00003aa0| 66 28 73 74 64 65 72 72 | 2c 20 22 62 61 74 63 68 |f(stderr|, "batch|
|00003ab0| 65 72 3a 20 6e 6f 20 66 | 69 72 73 74 20 6c 69 6e |er: no f|irst lin|
|00003ac0| 65 20 69 6e 20 64 66 5c | 6e 22 29 3b 0a 58 09 09 |e in df\|n");.X..|
|00003ad0| 72 65 74 75 72 6e 28 30 | 29 3b 0a 58 09 7d 0a 58 |return(0|);.X.}.X|
|00003ae0| 09 69 66 20 28 21 66 67 | 65 74 73 28 62 75 66 2c |.if (!fg|ets(buf,|
|00003af0| 20 73 69 7a 65 6f 66 28 | 62 75 66 29 2c 20 70 29 | sizeof(|buf), p)|
|00003b00| 29 20 7b 0a 58 09 09 66 | 70 72 69 6e 74 66 28 73 |) {.X..f|printf(s|
|00003b10| 74 64 65 72 72 2c 20 22 | 62 61 74 63 68 65 72 3a |tderr, "|batcher:|
|00003b20| 20 6e 6f 20 73 65 63 6f | 6e 64 20 6c 69 6e 65 20 | no seco|nd line |
|00003b30| 69 6e 20 64 66 5c 6e 22 | 29 3b 0a 58 09 09 72 65 |in df\n"|);.X..re|
|00003b40| 74 75 72 6e 28 30 29 3b | 0a 58 09 7d 0a 58 09 69 |turn(0);|.X.}.X.i|
|00003b50| 66 20 28 31 20 21 3d 20 | 73 73 63 61 6e 66 28 62 |f (1 != |sscanf(b|
|00003b60| 75 66 2c 20 22 25 2a 73 | 20 25 2a 6c 64 20 25 2a |uf, "%*s| %*ld %*|
|00003b70| 6c 64 20 25 6c 64 22 2c | 20 26 76 61 6c 29 29 20 |ld %ld",| &val)) |
|00003b80| 7b 0a 58 09 09 66 70 72 | 69 6e 74 66 28 73 74 64 |{.X..fpr|intf(std|
|00003b90| 65 72 72 2c 20 22 62 61 | 74 63 68 65 72 3a 20 63 |err, "ba|tcher: c|
|00003ba0| 6f 75 6c 64 6e 27 74 20 | 67 65 74 20 73 69 7a 65 |ouldn't |get size|
|00003bb0| 20 66 72 6f 6d 20 25 73 | 5c 6e 22 2c 20 62 75 66 | from %s|\n", buf|
|00003bc0| 29 3b 0a 58 09 09 72 65 | 74 75 72 6e 28 30 29 3b |);.X..re|turn(0);|
|00003bd0| 0a 58 09 7d 0a 58 09 69 | 66 20 28 70 63 6c 6f 73 |.X.}.X.i|f (pclos|
|00003be0| 65 28 70 29 29 20 7b 0a | 58 09 09 66 70 72 69 6e |e(p)) {.|X..fprin|
|00003bf0| 74 66 28 73 74 64 65 72 | 72 2c 20 22 62 61 74 63 |tf(stder|r, "batc|
|00003c00| 68 65 72 3a 20 44 46 20 | 66 61 69 6c 65 64 5c 6e |her: DF |failed\n|
|00003c10| 22 29 3b 0a 58 09 09 72 | 65 74 75 72 6e 28 30 29 |");.X..r|eturn(0)|
|00003c20| 3b 0a 58 09 7d 0a 58 09 | 76 61 6c 20 2a 3d 20 31 |;.X.}.X.|val *= 1|
|00003c30| 30 32 34 3b 0a 58 09 69 | 66 20 28 76 61 6c 20 3c |024;.X.i|f (val <|
|00003c40| 20 73 70 6f 6f 6c 6c 69 | 6d 29 20 7b 0a 58 09 09 | spoolli|m) {.X..|
|00003c50| 70 72 69 6e 74 66 28 22 | 62 61 74 63 68 65 72 3a |printf("|batcher:|
|00003c60| 20 73 70 6f 6f 6c 20 6c | 69 6d 69 74 20 65 78 63 | spool l|imit exc|
|00003c70| 65 65 64 65 64 2c 20 25 | 6c 64 20 62 79 74 65 73 |eeded, %|ld bytes|
|00003c80| 20 6c 65 66 74 5c 6e 22 | 2c 20 76 61 6c 29 3b 0a | left\n"|, val);.|
|00003c90| 58 09 09 72 65 74 75 72 | 6e 28 30 29 3b 0a 58 09 |X..retur|n(0);.X.|
|00003ca0| 7d 20 65 6c 73 65 0a 58 | 09 09 72 65 74 75 72 6e |} else.X|..return|
|00003cb0| 28 31 29 3b 0a 58 23 65 | 6c 73 65 0a 58 09 72 65 |(1);.X#e|lse.X.re|
|00003cc0| 74 75 72 6e 28 31 29 3b | 0a 58 23 65 6e 64 69 66 |turn(1);|.X#endif|
|00003cd0| 0a 58 7d 0a 2f 0a 65 63 | 68 6f 20 27 78 20 2d 20 |.X}./.ec|ho 'x - |
|00003ce0| 6d 61 6b 65 66 69 6c 65 | 27 0a 73 65 64 20 27 73 |makefile|'.sed 's|
|00003cf0| 2f 5e 58 2f 2f 27 20 3e | 20 6d 61 6b 65 66 69 6c |/^X//' >| makefil|
|00003d00| 65 20 3c 3c 20 27 2f 27 | 0a 58 43 46 4c 41 47 53 |e << '/'|.XCFLAGS|
|00003d10| 09 3d 20 2d 67 20 2d 44 | 42 53 44 34 5f 32 0a 58 |.= -g -D|BSD4_2.X|
|00003d20| 61 6c 6c 3a 09 62 61 74 | 63 68 65 72 0a 2f 0a 65 |all:.bat|cher./.e|
|00003d30| 63 68 6f 20 27 50 61 72 | 74 20 30 31 20 6f 66 20 |cho 'Par|t 01 of |
|00003d40| 70 61 63 6b 2e 6f 75 74 | 20 63 6f 6d 70 6c 65 74 |pack.out| complet|
|00003d50| 65 2e 27 0a 65 78 69 74 | 0a 2d 2d 20 0a 43 68 72 |e.'.exit|.-- .Chr|
|00003d60| 69 73 20 4c 65 77 69 73 | 2c 0a 0a 55 6e 74 69 6c |is Lewis|,..Until|
|00003d70| 20 74 6f 6d 6f 72 72 6f | 77 3a 0a 7b 70 79 72 61 | tomorro|w:.{pyra|
|00003d80| 6d 69 64 7c 77 61 74 6d | 61 74 68 7c 75 74 63 73 |mid|watm|ath|utcs|
|00003d90| 72 69 7c 64 65 63 76 61 | 78 7c 61 6c 6c 65 67 72 |ri|decva|x|allegr|
|00003da0| 61 7c 6c 69 6e 75 73 7c | 69 68 6e 70 34 7d 21 75 |a|linus||ihnp4}!u|
|00003db0| 74 7a 6f 6f 21 0a 7b 75 | 74 63 73 72 69 7c 63 62 |tzoo!.{u|tcsri|cb|
|00003dc0| 6f 73 67 64 7d 21 75 74 | 63 73 21 0a 7b 79 65 74 |osgd}!ut|cs!.{yet|
|00003dd0| 74 69 7c 6c 73 75 63 7c | 67 65 6e 61 74 7c 6d 6f |ti|lsuc||genat|mo|
|00003de0| 74 7c 6f 61 6b 68 69 6c | 6c 7d 21 0a 2e 2e 2e 20 |t|oakhil|l}!.... |
|00003df0| 6d 6e 65 74 6f 72 21 63 | 6c 65 77 69 73 0a 0a 4d |mnetor!c|lewis..M|
|00003e00| 6f 6e 64 61 79 3a 20 75 | 74 7a 6f 6f 21 73 70 65 |onday: u|tzoo!spe|
|00003e10| 63 74 72 69 78 21 63 6c | 65 77 69 73 20 20 28 49 |ctrix!cl|ewis (I|
|00003e20| 20 68 6f 70 65 29 0a 0a | 42 45 4c 4c 3a 20 28 34 | hope)..|BELL: (4|
|00003e30| 31 36 29 2d 34 37 35 2d | 38 39 38 30 20 65 78 74 |16)-475-|8980 ext|
|00003e40| 2e 20 33 32 31 0a 0a 0a | |. 321...| |
+--------+-------------------------+-------------------------+--------+--------+